package com.hzhr.iot.collect.aop.service;

import com.hzhr.iot.collect.service.base.BaseService;
import com.hzhr.iot.collect.service.util.CheckUtil;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Around;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;
import java.util.HashMap;
import java.util.Map;
import com.hzhr.iot.core.constant.Common_ErrorsEnum;
import com.hzhr.iot.core.exception.ServiceException;
import com.hzhr.iot.collect.model.command.setIotDeviceId.SetIotDeviceIdModel;
import com.hzhr.iot.collect.model.command.setHeartPeriod.SetHeartPeriodModel;
import com.hzhr.iot.collect.model.command.searchValveStatus.SearchValveStatusModel;
import com.hzhr.iot.collect.model.command.searchFreezingDay.SearchFreezingDayModel;
import com.hzhr.iot.collect.model.command.setConcentratorClock.SetConcentratorClockModel;
import com.hzhr.iot.collect.model.command.setReportFrequency.SetReportFrequencyModel;
import com.hzhr.iot.collect.model.command.searchReportPeriod.SearchReportPeriodModel;
import com.hzhr.iot.collect.model.command.searchHeartPeriod.SearchHeartPeriodModel;
import com.hzhr.iot.collect.model.command.searchConcentratorClock.SearchConcentratorClockModel;
import com.hzhr.iot.collect.model.command.setCollectFrequency.SetCollectFrequencyModel;
import com.hzhr.iot.collect.model.command.setFreezingDay.SetFreezingDayModel;
import com.hzhr.iot.collect.model.command.setIp.SetIpModel;
import com.hzhr.iot.collect.model.command.setReportPeriod.SetReportPeriodModel;
import com.hzhr.iot.collect.model.command.searchParam.SearchParamModel;
import com.hzhr.iot.collect.model.command.allowOpenValve.AllowOpenValveModel;
import com.hzhr.iot.collect.model.command.command_2_1025.Command_2_1025Model;
import com.hzhr.iot.collect.model.command.closeValve1.CloseValve1Model;
import com.hzhr.iot.collect.model.command.clearFault.ClearFaultModel;
import com.hzhr.iot.collect.model.command.searchMonthHis.SearchMonthHisModel;
import com.hzhr.iot.collect.model.command.setReportTime.SetReportTimeModel;
import com.hzhr.iot.collect.model.command.collect.CollectModel;
import com.hzhr.iot.collect.model.command.chongqi.ChongqiModel;
import com.hzhr.iot.collect.model.command.delMeter.DelMeterModel;
import com.hzhr.iot.collect.model.command.jichao.JichaoModel;
import com.hzhr.iot.collect.model.command.searchAlarm.SearchAlarmModel;
import com.hzhr.iot.collect.model.command.openValve.OpenValveModel;
import com.hzhr.iot.collect.model.command.addMeter.AddMeterModel;
import com.hzhr.iot.collect.model.command.searchIp.SearchIpModel;
import com.hzhr.iot.collect.model.command.searchReportTime.SearchReportTimeModel;
import com.hzhr.iot.collect.model.command.setAlarmValue.SetAlarmValueModel;
import com.hzhr.iot.collect.model.command.searchMeter.SearchMeterModel;
import com.hzhr.iot.collect.model.command.searchDayHis.SearchDayHisModel;
import com.hzhr.iot.collect.model.command.setNewMeterNo.SetNewMeterNoModel;
import com.hzhr.iot.collect.model.command.closeValve.CloseValveModel;
import com.hzhr.iot.collect.model.command.openValve1.OpenValve1Model;

@Aspect
@Component
@Order(2)
public class CommandServiceAspect extends BaseService {
    @Around("execution(* com.hzhr.iot.collect.service.CommandService.setIotDeviceId(..))")
    public Object setIotDeviceId(ProceedingJoinPoint joinPoint) throws Throwable {
        Object[] args = joinPoint.getArgs();
        Map<String, String> header = (Map<String, String>) args[0];
        if (header == null) {
            header = new HashMap<>();
        }
        Object protocolId = args[1];
        Map<String, Object> query = (Map<String, Object>) args[2];
        if (query == null) {
            query = new HashMap<>();
        }

        if (StringUtils.isEmpty(protocolId)) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "path.protocolId不能为空");
        }
        SetIotDeviceIdModel body = (SetIotDeviceIdModel)args[3];
        if (body == null) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body不能为空");
        }
        if (StringUtils.isEmpty(body.getDeviceId())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.deviceId不能为空");
        }
        if (StringUtils.isEmpty(body.getIotDeviceId())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.iotDeviceId不能为空");
        }

        Map<String, String> headerTmp = new HashMap<>();
        if (!StringUtils.isEmpty(header.get("_hzhr-company-id"))) {
            headerTmp.put("_hzhr-company-id", header.get("_hzhr-company-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-dept-id"))) {
            headerTmp.put("_hzhr-dept-id", header.get("_hzhr-dept-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-type"))) {
            headerTmp.put("_hzhr-user-type", header.get("_hzhr-user-type"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-access-mode"))) {
            headerTmp.put("_hzhr-access-mode", header.get("_hzhr-access-mode"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-name"))) {
            headerTmp.put("_hzhr-user-name", header.get("_hzhr-user-name"));
        }
        if (!StringUtils.isEmpty(header.get("_token"))) {
            headerTmp.put("_token", header.get("_token"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-code"))) {
            headerTmp.put("_hzhr-user-code", header.get("_hzhr-user-code"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-id"))) {
            headerTmp.put("_hzhr-transaction-id", header.get("_hzhr-transaction-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-id"))) {
            headerTmp.put("_hzhr-user-id", header.get("_hzhr-user-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-type"))) {
            headerTmp.put("_hzhr-transaction-type", header.get("_hzhr-transaction-type"));
        }
        if (!StringUtils.isEmpty(header.get("token"))) {
            headerTmp.put("_token", header.get("token"));
        }

        Map<String, Object> queryTmp = new HashMap<>();
        if (isInternalServiceInvok(headerTmp)) {
        } else {
        }

        if (isInternalServiceInvok(headerTmp)) {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._token不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-code"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-code不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-name"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-name不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-company-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-company-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-dept-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-dept-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-access-mode"))) {
                headerTmp.put("_hzhr-access-mode", "0");
            }
        } else {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header.token不能为空", objectInfo);
            }
        }

        if (!StringUtils.isEmpty(queryTmp.get("_is_paging")) && !Boolean.parseBoolean(queryTmp.get("_is_paging").toString())) {
            queryTmp.put("_page", null);
            queryTmp.put("_count", null);
        }
        args[2] = queryTmp;
        args[0] = headerTmp;
        return joinPoint.proceed(args);
    }
    @Around("execution(* com.hzhr.iot.collect.service.CommandService.ccr_setHeartPeriod(..))")
    public Object ccr_setHeartPeriod(ProceedingJoinPoint joinPoint) throws Throwable {
        Object[] args = joinPoint.getArgs();
        Map<String, String> header = (Map<String, String>) args[0];
        if (header == null) {
            header = new HashMap<>();
        }
        Object protocolId = args[1];
        Map<String, Object> query = (Map<String, Object>) args[2];
        if (query == null) {
            query = new HashMap<>();
        }

        if (StringUtils.isEmpty(protocolId)) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "path.protocolId不能为空");
        }
        SetHeartPeriodModel body = (SetHeartPeriodModel)args[3];
        if (body == null) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body不能为空");
        }
        if (StringUtils.isEmpty(body.getDeviceId())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.deviceId不能为空");
        }
        if (StringUtils.isEmpty(body.getHeartPeriod())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.heartPeriod不能为空");
        }

        Map<String, String> headerTmp = new HashMap<>();
        if (!StringUtils.isEmpty(header.get("_hzhr-company-id"))) {
            headerTmp.put("_hzhr-company-id", header.get("_hzhr-company-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-dept-id"))) {
            headerTmp.put("_hzhr-dept-id", header.get("_hzhr-dept-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-type"))) {
            headerTmp.put("_hzhr-user-type", header.get("_hzhr-user-type"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-access-mode"))) {
            headerTmp.put("_hzhr-access-mode", header.get("_hzhr-access-mode"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-name"))) {
            headerTmp.put("_hzhr-user-name", header.get("_hzhr-user-name"));
        }
        if (!StringUtils.isEmpty(header.get("_token"))) {
            headerTmp.put("_token", header.get("_token"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-code"))) {
            headerTmp.put("_hzhr-user-code", header.get("_hzhr-user-code"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-id"))) {
            headerTmp.put("_hzhr-transaction-id", header.get("_hzhr-transaction-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-id"))) {
            headerTmp.put("_hzhr-user-id", header.get("_hzhr-user-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-type"))) {
            headerTmp.put("_hzhr-transaction-type", header.get("_hzhr-transaction-type"));
        }
        if (!StringUtils.isEmpty(header.get("token"))) {
            headerTmp.put("_token", header.get("token"));
        }

        Map<String, Object> queryTmp = new HashMap<>();
        if (isInternalServiceInvok(headerTmp)) {
        } else {
        }

        if (isInternalServiceInvok(headerTmp)) {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._token不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-code"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-code不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-name"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-name不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-company-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-company-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-dept-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-dept-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-access-mode"))) {
                headerTmp.put("_hzhr-access-mode", "0");
            }
        } else {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header.token不能为空", objectInfo);
            }
        }

        if (!StringUtils.isEmpty(queryTmp.get("_is_paging")) && !Boolean.parseBoolean(queryTmp.get("_is_paging").toString())) {
            queryTmp.put("_page", null);
            queryTmp.put("_count", null);
        }
        args[2] = queryTmp;
        args[0] = headerTmp;
        return joinPoint.proceed(args);
    }
    @Around("execution(* com.hzhr.iot.collect.service.CommandService.ccr_searchValveStatus(..))")
    public Object ccr_searchValveStatus(ProceedingJoinPoint joinPoint) throws Throwable {
        Object[] args = joinPoint.getArgs();
        Map<String, String> header = (Map<String, String>) args[0];
        if (header == null) {
            header = new HashMap<>();
        }
        Object protocolId = args[1];
        Map<String, Object> query = (Map<String, Object>) args[2];
        if (query == null) {
            query = new HashMap<>();
        }

        if (StringUtils.isEmpty(protocolId)) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "path.protocolId不能为空");
        }
        SearchValveStatusModel body = (SearchValveStatusModel)args[3];
        if (body == null) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body不能为空");
        }
        if (StringUtils.isEmpty(body.getDeviceId())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.deviceId不能为空");
        }
        if (StringUtils.isEmpty(body.getMeterNo())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.meterNo不能为空");
        }

        Map<String, String> headerTmp = new HashMap<>();
        if (!StringUtils.isEmpty(header.get("_hzhr-company-id"))) {
            headerTmp.put("_hzhr-company-id", header.get("_hzhr-company-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-dept-id"))) {
            headerTmp.put("_hzhr-dept-id", header.get("_hzhr-dept-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-type"))) {
            headerTmp.put("_hzhr-user-type", header.get("_hzhr-user-type"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-access-mode"))) {
            headerTmp.put("_hzhr-access-mode", header.get("_hzhr-access-mode"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-name"))) {
            headerTmp.put("_hzhr-user-name", header.get("_hzhr-user-name"));
        }
        if (!StringUtils.isEmpty(header.get("_token"))) {
            headerTmp.put("_token", header.get("_token"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-code"))) {
            headerTmp.put("_hzhr-user-code", header.get("_hzhr-user-code"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-id"))) {
            headerTmp.put("_hzhr-transaction-id", header.get("_hzhr-transaction-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-id"))) {
            headerTmp.put("_hzhr-user-id", header.get("_hzhr-user-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-type"))) {
            headerTmp.put("_hzhr-transaction-type", header.get("_hzhr-transaction-type"));
        }
        if (!StringUtils.isEmpty(header.get("token"))) {
            headerTmp.put("_token", header.get("token"));
        }

        Map<String, Object> queryTmp = new HashMap<>();
        if (isInternalServiceInvok(headerTmp)) {
        } else {
        }

        if (isInternalServiceInvok(headerTmp)) {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._token不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-code"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-code不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-name"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-name不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-company-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-company-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-dept-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-dept-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-access-mode"))) {
                headerTmp.put("_hzhr-access-mode", "0");
            }
        } else {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header.token不能为空", objectInfo);
            }
        }

        if (!StringUtils.isEmpty(queryTmp.get("_is_paging")) && !Boolean.parseBoolean(queryTmp.get("_is_paging").toString())) {
            queryTmp.put("_page", null);
            queryTmp.put("_count", null);
        }
        args[2] = queryTmp;
        args[0] = headerTmp;
        return joinPoint.proceed(args);
    }
    @Around("execution(* com.hzhr.iot.collect.service.CommandService.searchFreezingDay(..))")
    public Object searchFreezingDay(ProceedingJoinPoint joinPoint) throws Throwable {
        Object[] args = joinPoint.getArgs();
        Map<String, String> header = (Map<String, String>) args[0];
        if (header == null) {
            header = new HashMap<>();
        }
        Object protocolId = args[1];
        Map<String, Object> query = (Map<String, Object>) args[2];
        if (query == null) {
            query = new HashMap<>();
        }

        if (StringUtils.isEmpty(protocolId)) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "path.protocolId不能为空");
        }
        SearchFreezingDayModel body = (SearchFreezingDayModel)args[3];
        if (body == null) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body不能为空");
        }
        if (StringUtils.isEmpty(body.getDeviceId())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.deviceId不能为空");
        }

        Map<String, String> headerTmp = new HashMap<>();
        if (!StringUtils.isEmpty(header.get("_hzhr-company-id"))) {
            headerTmp.put("_hzhr-company-id", header.get("_hzhr-company-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-dept-id"))) {
            headerTmp.put("_hzhr-dept-id", header.get("_hzhr-dept-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-type"))) {
            headerTmp.put("_hzhr-user-type", header.get("_hzhr-user-type"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-access-mode"))) {
            headerTmp.put("_hzhr-access-mode", header.get("_hzhr-access-mode"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-name"))) {
            headerTmp.put("_hzhr-user-name", header.get("_hzhr-user-name"));
        }
        if (!StringUtils.isEmpty(header.get("_token"))) {
            headerTmp.put("_token", header.get("_token"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-code"))) {
            headerTmp.put("_hzhr-user-code", header.get("_hzhr-user-code"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-id"))) {
            headerTmp.put("_hzhr-transaction-id", header.get("_hzhr-transaction-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-id"))) {
            headerTmp.put("_hzhr-user-id", header.get("_hzhr-user-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-type"))) {
            headerTmp.put("_hzhr-transaction-type", header.get("_hzhr-transaction-type"));
        }
        if (!StringUtils.isEmpty(header.get("token"))) {
            headerTmp.put("_token", header.get("token"));
        }

        Map<String, Object> queryTmp = new HashMap<>();
        if (isInternalServiceInvok(headerTmp)) {
        } else {
        }

        if (isInternalServiceInvok(headerTmp)) {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._token不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-code"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-code不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-name"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-name不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-company-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-company-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-dept-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-dept-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-access-mode"))) {
                headerTmp.put("_hzhr-access-mode", "0");
            }
        } else {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header.token不能为空", objectInfo);
            }
        }

        if (!StringUtils.isEmpty(queryTmp.get("_is_paging")) && !Boolean.parseBoolean(queryTmp.get("_is_paging").toString())) {
            queryTmp.put("_page", null);
            queryTmp.put("_count", null);
        }
        args[2] = queryTmp;
        args[0] = headerTmp;
        return joinPoint.proceed(args);
    }
    @Around("execution(* com.hzhr.iot.collect.service.CommandService.ccr_setConcentratorClock(..))")
    public Object ccr_setConcentratorClock(ProceedingJoinPoint joinPoint) throws Throwable {
        Object[] args = joinPoint.getArgs();
        Map<String, String> header = (Map<String, String>) args[0];
        if (header == null) {
            header = new HashMap<>();
        }
        Object protocolId = args[1];
        Map<String, Object> query = (Map<String, Object>) args[2];
        if (query == null) {
            query = new HashMap<>();
        }

        if (StringUtils.isEmpty(protocolId)) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "path.protocolId不能为空");
        }
        SetConcentratorClockModel body = (SetConcentratorClockModel)args[3];
        if (body == null) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body不能为空");
        }
        if (StringUtils.isEmpty(body.getDeviceId())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.deviceId不能为空");
        }
        if (StringUtils.isEmpty(body.getTime())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.time不能为空");
        }

        Map<String, String> headerTmp = new HashMap<>();
        if (!StringUtils.isEmpty(header.get("_hzhr-company-id"))) {
            headerTmp.put("_hzhr-company-id", header.get("_hzhr-company-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-dept-id"))) {
            headerTmp.put("_hzhr-dept-id", header.get("_hzhr-dept-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-type"))) {
            headerTmp.put("_hzhr-user-type", header.get("_hzhr-user-type"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-access-mode"))) {
            headerTmp.put("_hzhr-access-mode", header.get("_hzhr-access-mode"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-name"))) {
            headerTmp.put("_hzhr-user-name", header.get("_hzhr-user-name"));
        }
        if (!StringUtils.isEmpty(header.get("_token"))) {
            headerTmp.put("_token", header.get("_token"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-code"))) {
            headerTmp.put("_hzhr-user-code", header.get("_hzhr-user-code"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-id"))) {
            headerTmp.put("_hzhr-transaction-id", header.get("_hzhr-transaction-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-id"))) {
            headerTmp.put("_hzhr-user-id", header.get("_hzhr-user-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-type"))) {
            headerTmp.put("_hzhr-transaction-type", header.get("_hzhr-transaction-type"));
        }
        if (!StringUtils.isEmpty(header.get("token"))) {
            headerTmp.put("_token", header.get("token"));
        }

        Map<String, Object> queryTmp = new HashMap<>();
        if (isInternalServiceInvok(headerTmp)) {
        } else {
        }

        if (isInternalServiceInvok(headerTmp)) {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._token不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-code"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-code不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-name"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-name不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-company-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-company-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-dept-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-dept-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-access-mode"))) {
                headerTmp.put("_hzhr-access-mode", "0");
            }
        } else {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header.token不能为空", objectInfo);
            }
        }

        if (!StringUtils.isEmpty(queryTmp.get("_is_paging")) && !Boolean.parseBoolean(queryTmp.get("_is_paging").toString())) {
            queryTmp.put("_page", null);
            queryTmp.put("_count", null);
        }
        args[2] = queryTmp;
        args[0] = headerTmp;
        return joinPoint.proceed(args);
    }
    @Around("execution(* com.hzhr.iot.collect.service.CommandService.setReportFrequency(..))")
    public Object setReportFrequency(ProceedingJoinPoint joinPoint) throws Throwable {
        Object[] args = joinPoint.getArgs();
        Map<String, String> header = (Map<String, String>) args[0];
        if (header == null) {
            header = new HashMap<>();
        }
        Object protocolId = args[1];
        Map<String, Object> query = (Map<String, Object>) args[2];
        if (query == null) {
            query = new HashMap<>();
        }

        if (StringUtils.isEmpty(protocolId)) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "path.protocolId不能为空");
        }
        SetReportFrequencyModel body = (SetReportFrequencyModel)args[3];
        if (body == null) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body不能为空");
        }
        if (StringUtils.isEmpty(body.getDeviceId())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.deviceId不能为空");
        }
        if (StringUtils.isEmpty(body.getNormalFrequency_1hour())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.normalFrequency_1hour不能为空");
        }
        if (StringUtils.isEmpty(body.getExceptionFrequency_1min())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.exceptionFrequency_1min不能为空");
        }

        Map<String, String> headerTmp = new HashMap<>();
        if (!StringUtils.isEmpty(header.get("_hzhr-company-id"))) {
            headerTmp.put("_hzhr-company-id", header.get("_hzhr-company-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-dept-id"))) {
            headerTmp.put("_hzhr-dept-id", header.get("_hzhr-dept-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-type"))) {
            headerTmp.put("_hzhr-user-type", header.get("_hzhr-user-type"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-access-mode"))) {
            headerTmp.put("_hzhr-access-mode", header.get("_hzhr-access-mode"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-name"))) {
            headerTmp.put("_hzhr-user-name", header.get("_hzhr-user-name"));
        }
        if (!StringUtils.isEmpty(header.get("_token"))) {
            headerTmp.put("_token", header.get("_token"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-code"))) {
            headerTmp.put("_hzhr-user-code", header.get("_hzhr-user-code"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-id"))) {
            headerTmp.put("_hzhr-transaction-id", header.get("_hzhr-transaction-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-id"))) {
            headerTmp.put("_hzhr-user-id", header.get("_hzhr-user-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-type"))) {
            headerTmp.put("_hzhr-transaction-type", header.get("_hzhr-transaction-type"));
        }
        if (!StringUtils.isEmpty(header.get("token"))) {
            headerTmp.put("_token", header.get("token"));
        }

        Map<String, Object> queryTmp = new HashMap<>();
        if (isInternalServiceInvok(headerTmp)) {
        } else {
        }

        if (isInternalServiceInvok(headerTmp)) {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._token不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-code"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-code不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-name"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-name不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-company-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-company-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-dept-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-dept-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-access-mode"))) {
                headerTmp.put("_hzhr-access-mode", "0");
            }
        } else {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header.token不能为空", objectInfo);
            }
        }

        if (!StringUtils.isEmpty(queryTmp.get("_is_paging")) && !Boolean.parseBoolean(queryTmp.get("_is_paging").toString())) {
            queryTmp.put("_page", null);
            queryTmp.put("_count", null);
        }
        args[2] = queryTmp;
        args[0] = headerTmp;
        return joinPoint.proceed(args);
    }
    @Around("execution(* com.hzhr.iot.collect.service.CommandService.searchReportPeriod(..))")
    public Object searchReportPeriod(ProceedingJoinPoint joinPoint) throws Throwable {
        Object[] args = joinPoint.getArgs();
        Map<String, String> header = (Map<String, String>) args[0];
        if (header == null) {
            header = new HashMap<>();
        }
        Object protocolId = args[1];
        Map<String, Object> query = (Map<String, Object>) args[2];
        if (query == null) {
            query = new HashMap<>();
        }

        if (StringUtils.isEmpty(protocolId)) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "path.protocolId不能为空");
        }
        SearchReportPeriodModel body = (SearchReportPeriodModel)args[3];
        if (body == null) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body不能为空");
        }
        if (StringUtils.isEmpty(body.getDeviceId())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.deviceId不能为空");
        }

        Map<String, String> headerTmp = new HashMap<>();
        if (!StringUtils.isEmpty(header.get("_hzhr-company-id"))) {
            headerTmp.put("_hzhr-company-id", header.get("_hzhr-company-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-dept-id"))) {
            headerTmp.put("_hzhr-dept-id", header.get("_hzhr-dept-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-type"))) {
            headerTmp.put("_hzhr-user-type", header.get("_hzhr-user-type"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-access-mode"))) {
            headerTmp.put("_hzhr-access-mode", header.get("_hzhr-access-mode"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-name"))) {
            headerTmp.put("_hzhr-user-name", header.get("_hzhr-user-name"));
        }
        if (!StringUtils.isEmpty(header.get("_token"))) {
            headerTmp.put("_token", header.get("_token"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-code"))) {
            headerTmp.put("_hzhr-user-code", header.get("_hzhr-user-code"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-id"))) {
            headerTmp.put("_hzhr-transaction-id", header.get("_hzhr-transaction-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-id"))) {
            headerTmp.put("_hzhr-user-id", header.get("_hzhr-user-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-type"))) {
            headerTmp.put("_hzhr-transaction-type", header.get("_hzhr-transaction-type"));
        }
        if (!StringUtils.isEmpty(header.get("token"))) {
            headerTmp.put("_token", header.get("token"));
        }

        Map<String, Object> queryTmp = new HashMap<>();
        if (isInternalServiceInvok(headerTmp)) {
        } else {
        }

        if (isInternalServiceInvok(headerTmp)) {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._token不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-code"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-code不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-name"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-name不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-company-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-company-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-dept-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-dept-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-access-mode"))) {
                headerTmp.put("_hzhr-access-mode", "0");
            }
        } else {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header.token不能为空", objectInfo);
            }
        }

        if (!StringUtils.isEmpty(queryTmp.get("_is_paging")) && !Boolean.parseBoolean(queryTmp.get("_is_paging").toString())) {
            queryTmp.put("_page", null);
            queryTmp.put("_count", null);
        }
        args[2] = queryTmp;
        args[0] = headerTmp;
        return joinPoint.proceed(args);
    }
    @Around("execution(* com.hzhr.iot.collect.service.CommandService.ccr_searchHeartPeriod(..))")
    public Object ccr_searchHeartPeriod(ProceedingJoinPoint joinPoint) throws Throwable {
        Object[] args = joinPoint.getArgs();
        Map<String, String> header = (Map<String, String>) args[0];
        if (header == null) {
            header = new HashMap<>();
        }
        Object protocolId = args[1];
        Map<String, Object> query = (Map<String, Object>) args[2];
        if (query == null) {
            query = new HashMap<>();
        }

        if (StringUtils.isEmpty(protocolId)) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "path.protocolId不能为空");
        }
        SearchHeartPeriodModel body = (SearchHeartPeriodModel)args[3];
        if (body == null) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body不能为空");
        }
        if (StringUtils.isEmpty(body.getDeviceId())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.deviceId不能为空");
        }

        Map<String, String> headerTmp = new HashMap<>();
        if (!StringUtils.isEmpty(header.get("_hzhr-company-id"))) {
            headerTmp.put("_hzhr-company-id", header.get("_hzhr-company-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-dept-id"))) {
            headerTmp.put("_hzhr-dept-id", header.get("_hzhr-dept-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-type"))) {
            headerTmp.put("_hzhr-user-type", header.get("_hzhr-user-type"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-access-mode"))) {
            headerTmp.put("_hzhr-access-mode", header.get("_hzhr-access-mode"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-name"))) {
            headerTmp.put("_hzhr-user-name", header.get("_hzhr-user-name"));
        }
        if (!StringUtils.isEmpty(header.get("_token"))) {
            headerTmp.put("_token", header.get("_token"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-code"))) {
            headerTmp.put("_hzhr-user-code", header.get("_hzhr-user-code"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-id"))) {
            headerTmp.put("_hzhr-transaction-id", header.get("_hzhr-transaction-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-id"))) {
            headerTmp.put("_hzhr-user-id", header.get("_hzhr-user-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-type"))) {
            headerTmp.put("_hzhr-transaction-type", header.get("_hzhr-transaction-type"));
        }
        if (!StringUtils.isEmpty(header.get("token"))) {
            headerTmp.put("_token", header.get("token"));
        }

        Map<String, Object> queryTmp = new HashMap<>();
        if (isInternalServiceInvok(headerTmp)) {
        } else {
        }

        if (isInternalServiceInvok(headerTmp)) {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._token不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-code"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-code不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-name"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-name不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-company-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-company-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-dept-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-dept-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-access-mode"))) {
                headerTmp.put("_hzhr-access-mode", "0");
            }
        } else {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header.token不能为空", objectInfo);
            }
        }

        if (!StringUtils.isEmpty(queryTmp.get("_is_paging")) && !Boolean.parseBoolean(queryTmp.get("_is_paging").toString())) {
            queryTmp.put("_page", null);
            queryTmp.put("_count", null);
        }
        args[2] = queryTmp;
        args[0] = headerTmp;
        return joinPoint.proceed(args);
    }
    @Around("execution(* com.hzhr.iot.collect.service.CommandService.ccr_searchConcentratorClock(..))")
    public Object ccr_searchConcentratorClock(ProceedingJoinPoint joinPoint) throws Throwable {
        Object[] args = joinPoint.getArgs();
        Map<String, String> header = (Map<String, String>) args[0];
        if (header == null) {
            header = new HashMap<>();
        }
        Object protocolId = args[1];
        Map<String, Object> query = (Map<String, Object>) args[2];
        if (query == null) {
            query = new HashMap<>();
        }

        if (StringUtils.isEmpty(protocolId)) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "path.protocolId不能为空");
        }
        SearchConcentratorClockModel body = (SearchConcentratorClockModel)args[3];
        if (body == null) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body不能为空");
        }
        if (StringUtils.isEmpty(body.getDeviceId())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.deviceId不能为空");
        }

        Map<String, String> headerTmp = new HashMap<>();
        if (!StringUtils.isEmpty(header.get("_hzhr-company-id"))) {
            headerTmp.put("_hzhr-company-id", header.get("_hzhr-company-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-dept-id"))) {
            headerTmp.put("_hzhr-dept-id", header.get("_hzhr-dept-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-type"))) {
            headerTmp.put("_hzhr-user-type", header.get("_hzhr-user-type"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-access-mode"))) {
            headerTmp.put("_hzhr-access-mode", header.get("_hzhr-access-mode"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-name"))) {
            headerTmp.put("_hzhr-user-name", header.get("_hzhr-user-name"));
        }
        if (!StringUtils.isEmpty(header.get("_token"))) {
            headerTmp.put("_token", header.get("_token"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-code"))) {
            headerTmp.put("_hzhr-user-code", header.get("_hzhr-user-code"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-id"))) {
            headerTmp.put("_hzhr-transaction-id", header.get("_hzhr-transaction-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-id"))) {
            headerTmp.put("_hzhr-user-id", header.get("_hzhr-user-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-type"))) {
            headerTmp.put("_hzhr-transaction-type", header.get("_hzhr-transaction-type"));
        }
        if (!StringUtils.isEmpty(header.get("token"))) {
            headerTmp.put("_token", header.get("token"));
        }

        Map<String, Object> queryTmp = new HashMap<>();
        if (isInternalServiceInvok(headerTmp)) {
        } else {
        }

        if (isInternalServiceInvok(headerTmp)) {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._token不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-code"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-code不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-name"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-name不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-company-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-company-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-dept-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-dept-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-access-mode"))) {
                headerTmp.put("_hzhr-access-mode", "0");
            }
        } else {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header.token不能为空", objectInfo);
            }
        }

        if (!StringUtils.isEmpty(queryTmp.get("_is_paging")) && !Boolean.parseBoolean(queryTmp.get("_is_paging").toString())) {
            queryTmp.put("_page", null);
            queryTmp.put("_count", null);
        }
        args[2] = queryTmp;
        args[0] = headerTmp;
        return joinPoint.proceed(args);
    }
    @Around("execution(* com.hzhr.iot.collect.service.CommandService.setCollectFrequency(..))")
    public Object setCollectFrequency(ProceedingJoinPoint joinPoint) throws Throwable {
        Object[] args = joinPoint.getArgs();
        Map<String, String> header = (Map<String, String>) args[0];
        if (header == null) {
            header = new HashMap<>();
        }
        Object protocolId = args[1];
        Map<String, Object> query = (Map<String, Object>) args[2];
        if (query == null) {
            query = new HashMap<>();
        }

        if (StringUtils.isEmpty(protocolId)) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "path.protocolId不能为空");
        }
        SetCollectFrequencyModel body = (SetCollectFrequencyModel)args[3];
        if (body == null) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body不能为空");
        }
        if (StringUtils.isEmpty(body.getDeviceId())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.deviceId不能为空");
        }
        if (StringUtils.isEmpty(body.getNormalFrequency_5min())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.normalFrequency_5min不能为空");
        }
        if (StringUtils.isEmpty(body.getExceptionFrequency_1min())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.exceptionFrequency_1min不能为空");
        }

        Map<String, String> headerTmp = new HashMap<>();
        if (!StringUtils.isEmpty(header.get("_hzhr-company-id"))) {
            headerTmp.put("_hzhr-company-id", header.get("_hzhr-company-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-dept-id"))) {
            headerTmp.put("_hzhr-dept-id", header.get("_hzhr-dept-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-type"))) {
            headerTmp.put("_hzhr-user-type", header.get("_hzhr-user-type"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-access-mode"))) {
            headerTmp.put("_hzhr-access-mode", header.get("_hzhr-access-mode"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-name"))) {
            headerTmp.put("_hzhr-user-name", header.get("_hzhr-user-name"));
        }
        if (!StringUtils.isEmpty(header.get("_token"))) {
            headerTmp.put("_token", header.get("_token"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-code"))) {
            headerTmp.put("_hzhr-user-code", header.get("_hzhr-user-code"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-id"))) {
            headerTmp.put("_hzhr-transaction-id", header.get("_hzhr-transaction-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-id"))) {
            headerTmp.put("_hzhr-user-id", header.get("_hzhr-user-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-type"))) {
            headerTmp.put("_hzhr-transaction-type", header.get("_hzhr-transaction-type"));
        }
        if (!StringUtils.isEmpty(header.get("token"))) {
            headerTmp.put("_token", header.get("token"));
        }

        Map<String, Object> queryTmp = new HashMap<>();
        if (isInternalServiceInvok(headerTmp)) {
        } else {
        }

        if (isInternalServiceInvok(headerTmp)) {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._token不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-code"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-code不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-name"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-name不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-company-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-company-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-dept-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-dept-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-access-mode"))) {
                headerTmp.put("_hzhr-access-mode", "0");
            }
        } else {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header.token不能为空", objectInfo);
            }
        }

        if (!StringUtils.isEmpty(queryTmp.get("_is_paging")) && !Boolean.parseBoolean(queryTmp.get("_is_paging").toString())) {
            queryTmp.put("_page", null);
            queryTmp.put("_count", null);
        }
        args[2] = queryTmp;
        args[0] = headerTmp;
        return joinPoint.proceed(args);
    }
    @Around("execution(* com.hzhr.iot.collect.service.CommandService.setFreezingDay(..))")
    public Object setFreezingDay(ProceedingJoinPoint joinPoint) throws Throwable {
        Object[] args = joinPoint.getArgs();
        Map<String, String> header = (Map<String, String>) args[0];
        if (header == null) {
            header = new HashMap<>();
        }
        Object protocolId = args[1];
        Map<String, Object> query = (Map<String, Object>) args[2];
        if (query == null) {
            query = new HashMap<>();
        }

        if (StringUtils.isEmpty(protocolId)) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "path.protocolId不能为空");
        }
        SetFreezingDayModel body = (SetFreezingDayModel)args[3];
        if (body == null) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body不能为空");
        }
        if (StringUtils.isEmpty(body.getDeviceId())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.deviceId不能为空");
        }
        if (StringUtils.isEmpty(body.getFreezingDay())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.freezingDay不能为空");
        }

        Map<String, String> headerTmp = new HashMap<>();
        if (!StringUtils.isEmpty(header.get("_hzhr-company-id"))) {
            headerTmp.put("_hzhr-company-id", header.get("_hzhr-company-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-dept-id"))) {
            headerTmp.put("_hzhr-dept-id", header.get("_hzhr-dept-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-type"))) {
            headerTmp.put("_hzhr-user-type", header.get("_hzhr-user-type"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-access-mode"))) {
            headerTmp.put("_hzhr-access-mode", header.get("_hzhr-access-mode"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-name"))) {
            headerTmp.put("_hzhr-user-name", header.get("_hzhr-user-name"));
        }
        if (!StringUtils.isEmpty(header.get("_token"))) {
            headerTmp.put("_token", header.get("_token"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-code"))) {
            headerTmp.put("_hzhr-user-code", header.get("_hzhr-user-code"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-id"))) {
            headerTmp.put("_hzhr-transaction-id", header.get("_hzhr-transaction-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-id"))) {
            headerTmp.put("_hzhr-user-id", header.get("_hzhr-user-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-type"))) {
            headerTmp.put("_hzhr-transaction-type", header.get("_hzhr-transaction-type"));
        }
        if (!StringUtils.isEmpty(header.get("token"))) {
            headerTmp.put("_token", header.get("token"));
        }

        Map<String, Object> queryTmp = new HashMap<>();
        if (isInternalServiceInvok(headerTmp)) {
        } else {
        }

        if (isInternalServiceInvok(headerTmp)) {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._token不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-code"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-code不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-name"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-name不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-company-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-company-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-dept-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-dept-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-access-mode"))) {
                headerTmp.put("_hzhr-access-mode", "0");
            }
        } else {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header.token不能为空", objectInfo);
            }
        }

        if (!StringUtils.isEmpty(queryTmp.get("_is_paging")) && !Boolean.parseBoolean(queryTmp.get("_is_paging").toString())) {
            queryTmp.put("_page", null);
            queryTmp.put("_count", null);
        }
        args[2] = queryTmp;
        args[0] = headerTmp;
        return joinPoint.proceed(args);
    }
    @Around("execution(* com.hzhr.iot.collect.service.CommandService.setIp(..))")
    public Object setIp(ProceedingJoinPoint joinPoint) throws Throwable {
        Object[] args = joinPoint.getArgs();
        Map<String, String> header = (Map<String, String>) args[0];
        if (header == null) {
            header = new HashMap<>();
        }
        Object protocolId = args[1];
        Map<String, Object> query = (Map<String, Object>) args[2];
        if (query == null) {
            query = new HashMap<>();
        }

        if (StringUtils.isEmpty(protocolId)) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "path.protocolId不能为空");
        }
        SetIpModel body = (SetIpModel)args[3];
        if (body == null) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body不能为空");
        }
        if (StringUtils.isEmpty(body.getDeviceId())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.deviceId不能为空");
        }
        if (StringUtils.isEmpty(body.getIp())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.ip不能为空");
        }
        if (StringUtils.isEmpty(body.getPort())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.port不能为空");
        }

        Map<String, String> headerTmp = new HashMap<>();
        if (!StringUtils.isEmpty(header.get("_hzhr-company-id"))) {
            headerTmp.put("_hzhr-company-id", header.get("_hzhr-company-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-dept-id"))) {
            headerTmp.put("_hzhr-dept-id", header.get("_hzhr-dept-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-type"))) {
            headerTmp.put("_hzhr-user-type", header.get("_hzhr-user-type"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-access-mode"))) {
            headerTmp.put("_hzhr-access-mode", header.get("_hzhr-access-mode"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-name"))) {
            headerTmp.put("_hzhr-user-name", header.get("_hzhr-user-name"));
        }
        if (!StringUtils.isEmpty(header.get("_token"))) {
            headerTmp.put("_token", header.get("_token"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-code"))) {
            headerTmp.put("_hzhr-user-code", header.get("_hzhr-user-code"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-id"))) {
            headerTmp.put("_hzhr-transaction-id", header.get("_hzhr-transaction-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-id"))) {
            headerTmp.put("_hzhr-user-id", header.get("_hzhr-user-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-type"))) {
            headerTmp.put("_hzhr-transaction-type", header.get("_hzhr-transaction-type"));
        }
        if (!StringUtils.isEmpty(header.get("token"))) {
            headerTmp.put("_token", header.get("token"));
        }

        Map<String, Object> queryTmp = new HashMap<>();
        if (isInternalServiceInvok(headerTmp)) {
        } else {
        }

        if (isInternalServiceInvok(headerTmp)) {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._token不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-code"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-code不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-name"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-name不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-company-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-company-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-dept-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-dept-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-access-mode"))) {
                headerTmp.put("_hzhr-access-mode", "0");
            }
        } else {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header.token不能为空", objectInfo);
            }
        }

        if (!StringUtils.isEmpty(queryTmp.get("_is_paging")) && !Boolean.parseBoolean(queryTmp.get("_is_paging").toString())) {
            queryTmp.put("_page", null);
            queryTmp.put("_count", null);
        }
        args[2] = queryTmp;
        args[0] = headerTmp;
        return joinPoint.proceed(args);
    }
    @Around("execution(* com.hzhr.iot.collect.service.CommandService.setReportPeriod(..))")
    public Object setReportPeriod(ProceedingJoinPoint joinPoint) throws Throwable {
        Object[] args = joinPoint.getArgs();
        Map<String, String> header = (Map<String, String>) args[0];
        if (header == null) {
            header = new HashMap<>();
        }
        Object protocolId = args[1];
        Map<String, Object> query = (Map<String, Object>) args[2];
        if (query == null) {
            query = new HashMap<>();
        }

        if (StringUtils.isEmpty(protocolId)) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "path.protocolId不能为空");
        }
        SetReportPeriodModel body = (SetReportPeriodModel)args[3];
        if (body == null) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body不能为空");
        }
        if (StringUtils.isEmpty(body.getDeviceId())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.deviceId不能为空");
        }
        if (StringUtils.isEmpty(body.getReportPeriod())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.reportPeriod不能为空");
        }

        Map<String, String> headerTmp = new HashMap<>();
        if (!StringUtils.isEmpty(header.get("_hzhr-company-id"))) {
            headerTmp.put("_hzhr-company-id", header.get("_hzhr-company-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-dept-id"))) {
            headerTmp.put("_hzhr-dept-id", header.get("_hzhr-dept-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-type"))) {
            headerTmp.put("_hzhr-user-type", header.get("_hzhr-user-type"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-access-mode"))) {
            headerTmp.put("_hzhr-access-mode", header.get("_hzhr-access-mode"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-name"))) {
            headerTmp.put("_hzhr-user-name", header.get("_hzhr-user-name"));
        }
        if (!StringUtils.isEmpty(header.get("_token"))) {
            headerTmp.put("_token", header.get("_token"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-code"))) {
            headerTmp.put("_hzhr-user-code", header.get("_hzhr-user-code"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-id"))) {
            headerTmp.put("_hzhr-transaction-id", header.get("_hzhr-transaction-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-id"))) {
            headerTmp.put("_hzhr-user-id", header.get("_hzhr-user-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-type"))) {
            headerTmp.put("_hzhr-transaction-type", header.get("_hzhr-transaction-type"));
        }
        if (!StringUtils.isEmpty(header.get("token"))) {
            headerTmp.put("_token", header.get("token"));
        }

        Map<String, Object> queryTmp = new HashMap<>();
        if (isInternalServiceInvok(headerTmp)) {
        } else {
        }

        if (isInternalServiceInvok(headerTmp)) {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._token不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-code"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-code不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-name"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-name不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-company-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-company-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-dept-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-dept-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-access-mode"))) {
                headerTmp.put("_hzhr-access-mode", "0");
            }
        } else {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header.token不能为空", objectInfo);
            }
        }

        if (!StringUtils.isEmpty(queryTmp.get("_is_paging")) && !Boolean.parseBoolean(queryTmp.get("_is_paging").toString())) {
            queryTmp.put("_page", null);
            queryTmp.put("_count", null);
        }
        args[2] = queryTmp;
        args[0] = headerTmp;
        return joinPoint.proceed(args);
    }
    @Around("execution(* com.hzhr.iot.collect.service.CommandService.searchParam(..))")
    public Object searchParam(ProceedingJoinPoint joinPoint) throws Throwable {
        Object[] args = joinPoint.getArgs();
        Map<String, String> header = (Map<String, String>) args[0];
        if (header == null) {
            header = new HashMap<>();
        }
        Object protocolId = args[1];
        Map<String, Object> query = (Map<String, Object>) args[2];
        if (query == null) {
            query = new HashMap<>();
        }

        if (StringUtils.isEmpty(protocolId)) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "path.protocolId不能为空");
        }
        SearchParamModel body = (SearchParamModel)args[3];
        if (body == null) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body不能为空");
        }
        if (StringUtils.isEmpty(body.getDeviceId())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.deviceId不能为空");
        }

        Map<String, String> headerTmp = new HashMap<>();
        if (!StringUtils.isEmpty(header.get("_hzhr-company-id"))) {
            headerTmp.put("_hzhr-company-id", header.get("_hzhr-company-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-dept-id"))) {
            headerTmp.put("_hzhr-dept-id", header.get("_hzhr-dept-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-type"))) {
            headerTmp.put("_hzhr-user-type", header.get("_hzhr-user-type"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-access-mode"))) {
            headerTmp.put("_hzhr-access-mode", header.get("_hzhr-access-mode"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-name"))) {
            headerTmp.put("_hzhr-user-name", header.get("_hzhr-user-name"));
        }
        if (!StringUtils.isEmpty(header.get("_token"))) {
            headerTmp.put("_token", header.get("_token"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-code"))) {
            headerTmp.put("_hzhr-user-code", header.get("_hzhr-user-code"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-id"))) {
            headerTmp.put("_hzhr-transaction-id", header.get("_hzhr-transaction-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-id"))) {
            headerTmp.put("_hzhr-user-id", header.get("_hzhr-user-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-type"))) {
            headerTmp.put("_hzhr-transaction-type", header.get("_hzhr-transaction-type"));
        }
        if (!StringUtils.isEmpty(header.get("token"))) {
            headerTmp.put("_token", header.get("token"));
        }

        Map<String, Object> queryTmp = new HashMap<>();
        if (isInternalServiceInvok(headerTmp)) {
        } else {
        }

        if (isInternalServiceInvok(headerTmp)) {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._token不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-code"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-code不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-name"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-name不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-company-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-company-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-dept-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-dept-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-access-mode"))) {
                headerTmp.put("_hzhr-access-mode", "0");
            }
        } else {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header.token不能为空", objectInfo);
            }
        }

        if (!StringUtils.isEmpty(queryTmp.get("_is_paging")) && !Boolean.parseBoolean(queryTmp.get("_is_paging").toString())) {
            queryTmp.put("_page", null);
            queryTmp.put("_count", null);
        }
        args[2] = queryTmp;
        args[0] = headerTmp;
        return joinPoint.proceed(args);
    }
    @Around("execution(* com.hzhr.iot.collect.service.CommandService.allowOpenValve(..))")
    public Object allowOpenValve(ProceedingJoinPoint joinPoint) throws Throwable {
        Object[] args = joinPoint.getArgs();
        Map<String, String> header = (Map<String, String>) args[0];
        if (header == null) {
            header = new HashMap<>();
        }
        Object protocolId = args[1];
        Map<String, Object> query = (Map<String, Object>) args[2];
        if (query == null) {
            query = new HashMap<>();
        }

        if (StringUtils.isEmpty(protocolId)) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "path.protocolId不能为空");
        }
        AllowOpenValveModel body = (AllowOpenValveModel)args[3];
        if (body == null) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body不能为空");
        }
        if (StringUtils.isEmpty(body.getDeviceId())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.deviceId不能为空");
        }

        Map<String, String> headerTmp = new HashMap<>();
        if (!StringUtils.isEmpty(header.get("_hzhr-company-id"))) {
            headerTmp.put("_hzhr-company-id", header.get("_hzhr-company-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-dept-id"))) {
            headerTmp.put("_hzhr-dept-id", header.get("_hzhr-dept-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-type"))) {
            headerTmp.put("_hzhr-user-type", header.get("_hzhr-user-type"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-access-mode"))) {
            headerTmp.put("_hzhr-access-mode", header.get("_hzhr-access-mode"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-name"))) {
            headerTmp.put("_hzhr-user-name", header.get("_hzhr-user-name"));
        }
        if (!StringUtils.isEmpty(header.get("_token"))) {
            headerTmp.put("_token", header.get("_token"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-code"))) {
            headerTmp.put("_hzhr-user-code", header.get("_hzhr-user-code"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-id"))) {
            headerTmp.put("_hzhr-transaction-id", header.get("_hzhr-transaction-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-id"))) {
            headerTmp.put("_hzhr-user-id", header.get("_hzhr-user-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-type"))) {
            headerTmp.put("_hzhr-transaction-type", header.get("_hzhr-transaction-type"));
        }
        if (!StringUtils.isEmpty(header.get("token"))) {
            headerTmp.put("_token", header.get("token"));
        }

        Map<String, Object> queryTmp = new HashMap<>();
        if (isInternalServiceInvok(headerTmp)) {
        } else {
        }

        if (isInternalServiceInvok(headerTmp)) {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._token不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-code"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-code不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-name"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-name不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-company-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-company-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-dept-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-dept-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-access-mode"))) {
                headerTmp.put("_hzhr-access-mode", "0");
            }
        } else {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header.token不能为空", objectInfo);
            }
        }

        if (!StringUtils.isEmpty(queryTmp.get("_is_paging")) && !Boolean.parseBoolean(queryTmp.get("_is_paging").toString())) {
            queryTmp.put("_page", null);
            queryTmp.put("_count", null);
        }
        args[2] = queryTmp;
        args[0] = headerTmp;
        return joinPoint.proceed(args);
    }
    @Around("execution(* com.hzhr.iot.collect.service.CommandService.command_2_1025(..))")
    public Object command_2_1025(ProceedingJoinPoint joinPoint) throws Throwable {
        Object[] args = joinPoint.getArgs();
        Map<String, String> header = (Map<String, String>) args[0];
        if (header == null) {
            header = new HashMap<>();
        }
        Map<String, Object> query = (Map<String, Object>) args[1];
        if (query == null) {
            query = new HashMap<>();
        }

        Command_2_1025Model body = (Command_2_1025Model)args[2];
        if (body == null) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body不能为空");
        }
        if (StringUtils.isEmpty(body.getDeviceId())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.deviceId不能为空");
        }
        if (StringUtils.isEmpty(body.getYiBiaoChuShiZhi())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.yiBiaoChuShiZhi不能为空");
        }
        if (StringUtils.isEmpty(body.getMaiChongDangLiang())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.maiChongDangLiang不能为空");
        }

        Map<String, String> headerTmp = new HashMap<>();
        if (!StringUtils.isEmpty(header.get("_hzhr-company-id"))) {
            headerTmp.put("_hzhr-company-id", header.get("_hzhr-company-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-dept-id"))) {
            headerTmp.put("_hzhr-dept-id", header.get("_hzhr-dept-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-type"))) {
            headerTmp.put("_hzhr-user-type", header.get("_hzhr-user-type"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-access-mode"))) {
            headerTmp.put("_hzhr-access-mode", header.get("_hzhr-access-mode"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-name"))) {
            headerTmp.put("_hzhr-user-name", header.get("_hzhr-user-name"));
        }
        if (!StringUtils.isEmpty(header.get("_token"))) {
            headerTmp.put("_token", header.get("_token"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-code"))) {
            headerTmp.put("_hzhr-user-code", header.get("_hzhr-user-code"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-id"))) {
            headerTmp.put("_hzhr-transaction-id", header.get("_hzhr-transaction-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-id"))) {
            headerTmp.put("_hzhr-user-id", header.get("_hzhr-user-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-type"))) {
            headerTmp.put("_hzhr-transaction-type", header.get("_hzhr-transaction-type"));
        }
        if (!StringUtils.isEmpty(header.get("token"))) {
            headerTmp.put("_token", header.get("token"));
        }

        Map<String, Object> queryTmp = new HashMap<>();
        if (isInternalServiceInvok(headerTmp)) {
        } else {
        }

        if (isInternalServiceInvok(headerTmp)) {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._token不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-code"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-code不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-name"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-name不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-company-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-company-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-dept-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-dept-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-access-mode"))) {
                headerTmp.put("_hzhr-access-mode", "0");
            }
        } else {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header.token不能为空", objectInfo);
            }
        }

        if (!StringUtils.isEmpty(queryTmp.get("_is_paging")) && !Boolean.parseBoolean(queryTmp.get("_is_paging").toString())) {
            queryTmp.put("_page", null);
            queryTmp.put("_count", null);
        }
        args[1] = queryTmp;
        args[0] = headerTmp;
        return joinPoint.proceed(args);
    }
    @Around("execution(* com.hzhr.iot.collect.service.CommandService.ccr_closeValve(..))")
    public Object ccr_closeValve(ProceedingJoinPoint joinPoint) throws Throwable {
        Object[] args = joinPoint.getArgs();
        Map<String, String> header = (Map<String, String>) args[0];
        if (header == null) {
            header = new HashMap<>();
        }
        Object protocolId = args[1];
        Map<String, Object> query = (Map<String, Object>) args[2];
        if (query == null) {
            query = new HashMap<>();
        }

        if (StringUtils.isEmpty(protocolId)) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "path.protocolId不能为空");
        }
        CloseValve1Model body = (CloseValve1Model)args[3];
        if (body == null) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body不能为空");
        }
        if (StringUtils.isEmpty(body.getDeviceId())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.deviceId不能为空");
        }
        if (StringUtils.isEmpty(body.getMeterNo())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.meterNo不能为空");
        }

        Map<String, String> headerTmp = new HashMap<>();
        if (!StringUtils.isEmpty(header.get("_hzhr-company-id"))) {
            headerTmp.put("_hzhr-company-id", header.get("_hzhr-company-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-dept-id"))) {
            headerTmp.put("_hzhr-dept-id", header.get("_hzhr-dept-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-type"))) {
            headerTmp.put("_hzhr-user-type", header.get("_hzhr-user-type"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-access-mode"))) {
            headerTmp.put("_hzhr-access-mode", header.get("_hzhr-access-mode"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-name"))) {
            headerTmp.put("_hzhr-user-name", header.get("_hzhr-user-name"));
        }
        if (!StringUtils.isEmpty(header.get("_token"))) {
            headerTmp.put("_token", header.get("_token"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-code"))) {
            headerTmp.put("_hzhr-user-code", header.get("_hzhr-user-code"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-id"))) {
            headerTmp.put("_hzhr-transaction-id", header.get("_hzhr-transaction-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-id"))) {
            headerTmp.put("_hzhr-user-id", header.get("_hzhr-user-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-type"))) {
            headerTmp.put("_hzhr-transaction-type", header.get("_hzhr-transaction-type"));
        }
        if (!StringUtils.isEmpty(header.get("token"))) {
            headerTmp.put("_token", header.get("token"));
        }

        Map<String, Object> queryTmp = new HashMap<>();
        if (isInternalServiceInvok(headerTmp)) {
        } else {
        }

        if (isInternalServiceInvok(headerTmp)) {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._token不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-code"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-code不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-name"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-name不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-company-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-company-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-dept-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-dept-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-access-mode"))) {
                headerTmp.put("_hzhr-access-mode", "0");
            }
        } else {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header.token不能为空", objectInfo);
            }
        }

        if (!StringUtils.isEmpty(queryTmp.get("_is_paging")) && !Boolean.parseBoolean(queryTmp.get("_is_paging").toString())) {
            queryTmp.put("_page", null);
            queryTmp.put("_count", null);
        }
        args[2] = queryTmp;
        args[0] = headerTmp;
        return joinPoint.proceed(args);
    }
    @Around("execution(* com.hzhr.iot.collect.service.CommandService.clearFault(..))")
    public Object clearFault(ProceedingJoinPoint joinPoint) throws Throwable {
        Object[] args = joinPoint.getArgs();
        Map<String, String> header = (Map<String, String>) args[0];
        if (header == null) {
            header = new HashMap<>();
        }
        Object protocolId = args[1];
        Map<String, Object> query = (Map<String, Object>) args[2];
        if (query == null) {
            query = new HashMap<>();
        }

        if (StringUtils.isEmpty(protocolId)) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "path.protocolId不能为空");
        }
        ClearFaultModel body = (ClearFaultModel)args[3];
        if (body == null) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body不能为空");
        }
        if (StringUtils.isEmpty(body.getDeviceId())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.deviceId不能为空");
        }
        if (StringUtils.isEmpty(body.getFault())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.fault不能为空");
        }

        Map<String, String> headerTmp = new HashMap<>();
        if (!StringUtils.isEmpty(header.get("_hzhr-company-id"))) {
            headerTmp.put("_hzhr-company-id", header.get("_hzhr-company-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-dept-id"))) {
            headerTmp.put("_hzhr-dept-id", header.get("_hzhr-dept-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-type"))) {
            headerTmp.put("_hzhr-user-type", header.get("_hzhr-user-type"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-access-mode"))) {
            headerTmp.put("_hzhr-access-mode", header.get("_hzhr-access-mode"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-name"))) {
            headerTmp.put("_hzhr-user-name", header.get("_hzhr-user-name"));
        }
        if (!StringUtils.isEmpty(header.get("_token"))) {
            headerTmp.put("_token", header.get("_token"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-code"))) {
            headerTmp.put("_hzhr-user-code", header.get("_hzhr-user-code"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-id"))) {
            headerTmp.put("_hzhr-transaction-id", header.get("_hzhr-transaction-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-id"))) {
            headerTmp.put("_hzhr-user-id", header.get("_hzhr-user-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-type"))) {
            headerTmp.put("_hzhr-transaction-type", header.get("_hzhr-transaction-type"));
        }
        if (!StringUtils.isEmpty(header.get("token"))) {
            headerTmp.put("_token", header.get("token"));
        }

        Map<String, Object> queryTmp = new HashMap<>();
        if (isInternalServiceInvok(headerTmp)) {
        } else {
        }

        if (isInternalServiceInvok(headerTmp)) {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._token不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-code"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-code不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-name"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-name不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-company-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-company-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-dept-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-dept-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-access-mode"))) {
                headerTmp.put("_hzhr-access-mode", "0");
            }
        } else {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header.token不能为空", objectInfo);
            }
        }

        if (!StringUtils.isEmpty(queryTmp.get("_is_paging")) && !Boolean.parseBoolean(queryTmp.get("_is_paging").toString())) {
            queryTmp.put("_page", null);
            queryTmp.put("_count", null);
        }
        args[2] = queryTmp;
        args[0] = headerTmp;
        return joinPoint.proceed(args);
    }
    @Around("execution(* com.hzhr.iot.collect.service.CommandService.searchMonthHis(..))")
    public Object searchMonthHis(ProceedingJoinPoint joinPoint) throws Throwable {
        Object[] args = joinPoint.getArgs();
        Map<String, String> header = (Map<String, String>) args[0];
        if (header == null) {
            header = new HashMap<>();
        }
        Object protocolId = args[1];
        Map<String, Object> query = (Map<String, Object>) args[2];
        if (query == null) {
            query = new HashMap<>();
        }

        if (StringUtils.isEmpty(protocolId)) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "path.protocolId不能为空");
        }
        SearchMonthHisModel body = (SearchMonthHisModel)args[3];
        if (body == null) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body不能为空");
        }
        if (StringUtils.isEmpty(body.getDeviceId())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.deviceId不能为空");
        }

        Map<String, String> headerTmp = new HashMap<>();
        if (!StringUtils.isEmpty(header.get("_hzhr-company-id"))) {
            headerTmp.put("_hzhr-company-id", header.get("_hzhr-company-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-dept-id"))) {
            headerTmp.put("_hzhr-dept-id", header.get("_hzhr-dept-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-type"))) {
            headerTmp.put("_hzhr-user-type", header.get("_hzhr-user-type"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-access-mode"))) {
            headerTmp.put("_hzhr-access-mode", header.get("_hzhr-access-mode"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-name"))) {
            headerTmp.put("_hzhr-user-name", header.get("_hzhr-user-name"));
        }
        if (!StringUtils.isEmpty(header.get("_token"))) {
            headerTmp.put("_token", header.get("_token"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-code"))) {
            headerTmp.put("_hzhr-user-code", header.get("_hzhr-user-code"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-id"))) {
            headerTmp.put("_hzhr-transaction-id", header.get("_hzhr-transaction-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-id"))) {
            headerTmp.put("_hzhr-user-id", header.get("_hzhr-user-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-type"))) {
            headerTmp.put("_hzhr-transaction-type", header.get("_hzhr-transaction-type"));
        }
        if (!StringUtils.isEmpty(header.get("token"))) {
            headerTmp.put("_token", header.get("token"));
        }

        Map<String, Object> queryTmp = new HashMap<>();
        if (isInternalServiceInvok(headerTmp)) {
        } else {
        }

        if (isInternalServiceInvok(headerTmp)) {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._token不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-code"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-code不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-name"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-name不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-company-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-company-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-dept-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-dept-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-access-mode"))) {
                headerTmp.put("_hzhr-access-mode", "0");
            }
        } else {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header.token不能为空", objectInfo);
            }
        }

        if (!StringUtils.isEmpty(queryTmp.get("_is_paging")) && !Boolean.parseBoolean(queryTmp.get("_is_paging").toString())) {
            queryTmp.put("_page", null);
            queryTmp.put("_count", null);
        }
        args[2] = queryTmp;
        args[0] = headerTmp;
        return joinPoint.proceed(args);
    }
    @Around("execution(* com.hzhr.iot.collect.service.CommandService.setReportTime(..))")
    public Object setReportTime(ProceedingJoinPoint joinPoint) throws Throwable {
        Object[] args = joinPoint.getArgs();
        Map<String, String> header = (Map<String, String>) args[0];
        if (header == null) {
            header = new HashMap<>();
        }
        Object protocolId = args[1];
        Map<String, Object> query = (Map<String, Object>) args[2];
        if (query == null) {
            query = new HashMap<>();
        }

        if (StringUtils.isEmpty(protocolId)) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "path.protocolId不能为空");
        }
        SetReportTimeModel body = (SetReportTimeModel)args[3];
        if (body == null) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body不能为空");
        }
        if (StringUtils.isEmpty(body.getDeviceId())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.deviceId不能为空");
        }
        if (StringUtils.isEmpty(body.getWaketime())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.waketime不能为空");
        }

        Map<String, String> headerTmp = new HashMap<>();
        if (!StringUtils.isEmpty(header.get("_hzhr-company-id"))) {
            headerTmp.put("_hzhr-company-id", header.get("_hzhr-company-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-dept-id"))) {
            headerTmp.put("_hzhr-dept-id", header.get("_hzhr-dept-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-type"))) {
            headerTmp.put("_hzhr-user-type", header.get("_hzhr-user-type"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-access-mode"))) {
            headerTmp.put("_hzhr-access-mode", header.get("_hzhr-access-mode"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-name"))) {
            headerTmp.put("_hzhr-user-name", header.get("_hzhr-user-name"));
        }
        if (!StringUtils.isEmpty(header.get("_token"))) {
            headerTmp.put("_token", header.get("_token"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-code"))) {
            headerTmp.put("_hzhr-user-code", header.get("_hzhr-user-code"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-id"))) {
            headerTmp.put("_hzhr-transaction-id", header.get("_hzhr-transaction-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-id"))) {
            headerTmp.put("_hzhr-user-id", header.get("_hzhr-user-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-type"))) {
            headerTmp.put("_hzhr-transaction-type", header.get("_hzhr-transaction-type"));
        }
        if (!StringUtils.isEmpty(header.get("token"))) {
            headerTmp.put("_token", header.get("token"));
        }

        Map<String, Object> queryTmp = new HashMap<>();
        if (isInternalServiceInvok(headerTmp)) {
        } else {
        }

        if (isInternalServiceInvok(headerTmp)) {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._token不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-code"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-code不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-name"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-name不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-company-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-company-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-dept-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-dept-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-access-mode"))) {
                headerTmp.put("_hzhr-access-mode", "0");
            }
        } else {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header.token不能为空", objectInfo);
            }
        }

        if (!StringUtils.isEmpty(queryTmp.get("_is_paging")) && !Boolean.parseBoolean(queryTmp.get("_is_paging").toString())) {
            queryTmp.put("_page", null);
            queryTmp.put("_count", null);
        }
        args[2] = queryTmp;
        args[0] = headerTmp;
        return joinPoint.proceed(args);
    }
    @Around("execution(* com.hzhr.iot.collect.service.CommandService.ccr_collect(..))")
    public Object ccr_collect(ProceedingJoinPoint joinPoint) throws Throwable {
        Object[] args = joinPoint.getArgs();
        Map<String, String> header = (Map<String, String>) args[0];
        if (header == null) {
            header = new HashMap<>();
        }
        Object protocolId = args[1];
        Map<String, Object> query = (Map<String, Object>) args[2];
        if (query == null) {
            query = new HashMap<>();
        }

        if (StringUtils.isEmpty(protocolId)) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "path.protocolId不能为空");
        }
        CollectModel body = (CollectModel)args[3];
        if (body == null) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body不能为空");
        }
        if (StringUtils.isEmpty(body.getDeviceId())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.deviceId不能为空");
        }
        if (StringUtils.isEmpty(body.getMeterNo())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.meterNo不能为空");
        }

        Map<String, String> headerTmp = new HashMap<>();
        if (!StringUtils.isEmpty(header.get("_hzhr-company-id"))) {
            headerTmp.put("_hzhr-company-id", header.get("_hzhr-company-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-dept-id"))) {
            headerTmp.put("_hzhr-dept-id", header.get("_hzhr-dept-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-type"))) {
            headerTmp.put("_hzhr-user-type", header.get("_hzhr-user-type"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-access-mode"))) {
            headerTmp.put("_hzhr-access-mode", header.get("_hzhr-access-mode"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-name"))) {
            headerTmp.put("_hzhr-user-name", header.get("_hzhr-user-name"));
        }
        if (!StringUtils.isEmpty(header.get("_token"))) {
            headerTmp.put("_token", header.get("_token"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-code"))) {
            headerTmp.put("_hzhr-user-code", header.get("_hzhr-user-code"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-id"))) {
            headerTmp.put("_hzhr-transaction-id", header.get("_hzhr-transaction-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-id"))) {
            headerTmp.put("_hzhr-user-id", header.get("_hzhr-user-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-type"))) {
            headerTmp.put("_hzhr-transaction-type", header.get("_hzhr-transaction-type"));
        }
        if (!StringUtils.isEmpty(header.get("token"))) {
            headerTmp.put("_token", header.get("token"));
        }

        Map<String, Object> queryTmp = new HashMap<>();
        if (isInternalServiceInvok(headerTmp)) {
        } else {
        }

        if (isInternalServiceInvok(headerTmp)) {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._token不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-code"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-code不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-name"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-name不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-company-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-company-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-dept-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-dept-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-access-mode"))) {
                headerTmp.put("_hzhr-access-mode", "0");
            }
        } else {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header.token不能为空", objectInfo);
            }
        }

        if (!StringUtils.isEmpty(queryTmp.get("_is_paging")) && !Boolean.parseBoolean(queryTmp.get("_is_paging").toString())) {
            queryTmp.put("_page", null);
            queryTmp.put("_count", null);
        }
        args[2] = queryTmp;
        args[0] = headerTmp;
        return joinPoint.proceed(args);
    }
    @Around("execution(* com.hzhr.iot.collect.service.CommandService.ccr_chongqi(..))")
    public Object ccr_chongqi(ProceedingJoinPoint joinPoint) throws Throwable {
        Object[] args = joinPoint.getArgs();
        Map<String, String> header = (Map<String, String>) args[0];
        if (header == null) {
            header = new HashMap<>();
        }
        Object protocolId = args[1];
        Map<String, Object> query = (Map<String, Object>) args[2];
        if (query == null) {
            query = new HashMap<>();
        }

        if (StringUtils.isEmpty(protocolId)) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "path.protocolId不能为空");
        }
        ChongqiModel body = (ChongqiModel)args[3];
        if (body == null) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body不能为空");
        }
        if (StringUtils.isEmpty(body.getDeviceId())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.deviceId不能为空");
        }

        Map<String, String> headerTmp = new HashMap<>();
        if (!StringUtils.isEmpty(header.get("_hzhr-company-id"))) {
            headerTmp.put("_hzhr-company-id", header.get("_hzhr-company-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-dept-id"))) {
            headerTmp.put("_hzhr-dept-id", header.get("_hzhr-dept-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-type"))) {
            headerTmp.put("_hzhr-user-type", header.get("_hzhr-user-type"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-access-mode"))) {
            headerTmp.put("_hzhr-access-mode", header.get("_hzhr-access-mode"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-name"))) {
            headerTmp.put("_hzhr-user-name", header.get("_hzhr-user-name"));
        }
        if (!StringUtils.isEmpty(header.get("_token"))) {
            headerTmp.put("_token", header.get("_token"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-code"))) {
            headerTmp.put("_hzhr-user-code", header.get("_hzhr-user-code"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-id"))) {
            headerTmp.put("_hzhr-transaction-id", header.get("_hzhr-transaction-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-id"))) {
            headerTmp.put("_hzhr-user-id", header.get("_hzhr-user-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-type"))) {
            headerTmp.put("_hzhr-transaction-type", header.get("_hzhr-transaction-type"));
        }
        if (!StringUtils.isEmpty(header.get("token"))) {
            headerTmp.put("_token", header.get("token"));
        }

        Map<String, Object> queryTmp = new HashMap<>();
        if (isInternalServiceInvok(headerTmp)) {
        } else {
        }

        if (isInternalServiceInvok(headerTmp)) {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._token不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-code"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-code不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-name"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-name不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-company-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-company-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-dept-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-dept-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-access-mode"))) {
                headerTmp.put("_hzhr-access-mode", "0");
            }
        } else {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header.token不能为空", objectInfo);
            }
        }

        if (!StringUtils.isEmpty(queryTmp.get("_is_paging")) && !Boolean.parseBoolean(queryTmp.get("_is_paging").toString())) {
            queryTmp.put("_page", null);
            queryTmp.put("_count", null);
        }
        args[2] = queryTmp;
        args[0] = headerTmp;
        return joinPoint.proceed(args);
    }
    @Around("execution(* com.hzhr.iot.collect.service.CommandService.ccr_delMeter(..))")
    public Object ccr_delMeter(ProceedingJoinPoint joinPoint) throws Throwable {
        Object[] args = joinPoint.getArgs();
        Map<String, String> header = (Map<String, String>) args[0];
        if (header == null) {
            header = new HashMap<>();
        }
        Object protocolId = args[1];
        Map<String, Object> query = (Map<String, Object>) args[2];
        if (query == null) {
            query = new HashMap<>();
        }

        if (StringUtils.isEmpty(protocolId)) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "path.protocolId不能为空");
        }
        DelMeterModel body = (DelMeterModel)args[3];
        if (body == null) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body不能为空");
        }
        if (StringUtils.isEmpty(body.getDeviceId())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.deviceId不能为空");
        }
        if (StringUtils.isEmpty(body.getMeterNo())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.meterNo不能为空");
        }

        Map<String, String> headerTmp = new HashMap<>();
        if (!StringUtils.isEmpty(header.get("_hzhr-company-id"))) {
            headerTmp.put("_hzhr-company-id", header.get("_hzhr-company-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-dept-id"))) {
            headerTmp.put("_hzhr-dept-id", header.get("_hzhr-dept-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-type"))) {
            headerTmp.put("_hzhr-user-type", header.get("_hzhr-user-type"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-access-mode"))) {
            headerTmp.put("_hzhr-access-mode", header.get("_hzhr-access-mode"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-name"))) {
            headerTmp.put("_hzhr-user-name", header.get("_hzhr-user-name"));
        }
        if (!StringUtils.isEmpty(header.get("_token"))) {
            headerTmp.put("_token", header.get("_token"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-code"))) {
            headerTmp.put("_hzhr-user-code", header.get("_hzhr-user-code"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-id"))) {
            headerTmp.put("_hzhr-transaction-id", header.get("_hzhr-transaction-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-id"))) {
            headerTmp.put("_hzhr-user-id", header.get("_hzhr-user-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-type"))) {
            headerTmp.put("_hzhr-transaction-type", header.get("_hzhr-transaction-type"));
        }
        if (!StringUtils.isEmpty(header.get("token"))) {
            headerTmp.put("_token", header.get("token"));
        }

        Map<String, Object> queryTmp = new HashMap<>();
        if (isInternalServiceInvok(headerTmp)) {
        } else {
        }

        if (isInternalServiceInvok(headerTmp)) {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._token不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-code"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-code不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-name"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-name不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-company-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-company-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-dept-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-dept-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-access-mode"))) {
                headerTmp.put("_hzhr-access-mode", "0");
            }
        } else {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header.token不能为空", objectInfo);
            }
        }

        if (!StringUtils.isEmpty(queryTmp.get("_is_paging")) && !Boolean.parseBoolean(queryTmp.get("_is_paging").toString())) {
            queryTmp.put("_page", null);
            queryTmp.put("_count", null);
        }
        args[2] = queryTmp;
        args[0] = headerTmp;
        return joinPoint.proceed(args);
    }
    @Around("execution(* com.hzhr.iot.collect.service.CommandService.ccr_jichao(..))")
    public Object ccr_jichao(ProceedingJoinPoint joinPoint) throws Throwable {
        Object[] args = joinPoint.getArgs();
        Map<String, String> header = (Map<String, String>) args[0];
        if (header == null) {
            header = new HashMap<>();
        }
        Object protocolId = args[1];
        Map<String, Object> query = (Map<String, Object>) args[2];
        if (query == null) {
            query = new HashMap<>();
        }

        if (StringUtils.isEmpty(protocolId)) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "path.protocolId不能为空");
        }
        JichaoModel body = (JichaoModel)args[3];
        if (body == null) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body不能为空");
        }
        if (StringUtils.isEmpty(body.getDeviceId())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.deviceId不能为空");
        }

        Map<String, String> headerTmp = new HashMap<>();
        if (!StringUtils.isEmpty(header.get("_hzhr-company-id"))) {
            headerTmp.put("_hzhr-company-id", header.get("_hzhr-company-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-dept-id"))) {
            headerTmp.put("_hzhr-dept-id", header.get("_hzhr-dept-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-type"))) {
            headerTmp.put("_hzhr-user-type", header.get("_hzhr-user-type"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-access-mode"))) {
            headerTmp.put("_hzhr-access-mode", header.get("_hzhr-access-mode"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-name"))) {
            headerTmp.put("_hzhr-user-name", header.get("_hzhr-user-name"));
        }
        if (!StringUtils.isEmpty(header.get("_token"))) {
            headerTmp.put("_token", header.get("_token"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-code"))) {
            headerTmp.put("_hzhr-user-code", header.get("_hzhr-user-code"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-id"))) {
            headerTmp.put("_hzhr-transaction-id", header.get("_hzhr-transaction-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-id"))) {
            headerTmp.put("_hzhr-user-id", header.get("_hzhr-user-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-type"))) {
            headerTmp.put("_hzhr-transaction-type", header.get("_hzhr-transaction-type"));
        }
        if (!StringUtils.isEmpty(header.get("token"))) {
            headerTmp.put("_token", header.get("token"));
        }

        Map<String, Object> queryTmp = new HashMap<>();
        if (isInternalServiceInvok(headerTmp)) {
        } else {
        }

        if (isInternalServiceInvok(headerTmp)) {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._token不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-code"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-code不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-name"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-name不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-company-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-company-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-dept-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-dept-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-access-mode"))) {
                headerTmp.put("_hzhr-access-mode", "0");
            }
        } else {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header.token不能为空", objectInfo);
            }
        }

        if (!StringUtils.isEmpty(queryTmp.get("_is_paging")) && !Boolean.parseBoolean(queryTmp.get("_is_paging").toString())) {
            queryTmp.put("_page", null);
            queryTmp.put("_count", null);
        }
        args[2] = queryTmp;
        args[0] = headerTmp;
        return joinPoint.proceed(args);
    }
    @Around("execution(* com.hzhr.iot.collect.service.CommandService.searchAlarm(..))")
    public Object searchAlarm(ProceedingJoinPoint joinPoint) throws Throwable {
        Object[] args = joinPoint.getArgs();
        Map<String, String> header = (Map<String, String>) args[0];
        if (header == null) {
            header = new HashMap<>();
        }
        Object protocolId = args[1];
        Map<String, Object> query = (Map<String, Object>) args[2];
        if (query == null) {
            query = new HashMap<>();
        }

        if (StringUtils.isEmpty(protocolId)) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "path.protocolId不能为空");
        }
        SearchAlarmModel body = (SearchAlarmModel)args[3];
        if (body == null) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body不能为空");
        }
        if (StringUtils.isEmpty(body.getDeviceId())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.deviceId不能为空");
        }

        Map<String, String> headerTmp = new HashMap<>();
        if (!StringUtils.isEmpty(header.get("_hzhr-company-id"))) {
            headerTmp.put("_hzhr-company-id", header.get("_hzhr-company-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-dept-id"))) {
            headerTmp.put("_hzhr-dept-id", header.get("_hzhr-dept-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-type"))) {
            headerTmp.put("_hzhr-user-type", header.get("_hzhr-user-type"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-access-mode"))) {
            headerTmp.put("_hzhr-access-mode", header.get("_hzhr-access-mode"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-name"))) {
            headerTmp.put("_hzhr-user-name", header.get("_hzhr-user-name"));
        }
        if (!StringUtils.isEmpty(header.get("_token"))) {
            headerTmp.put("_token", header.get("_token"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-code"))) {
            headerTmp.put("_hzhr-user-code", header.get("_hzhr-user-code"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-id"))) {
            headerTmp.put("_hzhr-transaction-id", header.get("_hzhr-transaction-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-id"))) {
            headerTmp.put("_hzhr-user-id", header.get("_hzhr-user-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-type"))) {
            headerTmp.put("_hzhr-transaction-type", header.get("_hzhr-transaction-type"));
        }
        if (!StringUtils.isEmpty(header.get("token"))) {
            headerTmp.put("_token", header.get("token"));
        }

        Map<String, Object> queryTmp = new HashMap<>();
        if (isInternalServiceInvok(headerTmp)) {
        } else {
        }

        if (isInternalServiceInvok(headerTmp)) {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._token不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-code"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-code不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-name"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-name不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-company-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-company-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-dept-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-dept-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-access-mode"))) {
                headerTmp.put("_hzhr-access-mode", "0");
            }
        } else {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header.token不能为空", objectInfo);
            }
        }

        if (!StringUtils.isEmpty(queryTmp.get("_is_paging")) && !Boolean.parseBoolean(queryTmp.get("_is_paging").toString())) {
            queryTmp.put("_page", null);
            queryTmp.put("_count", null);
        }
        args[2] = queryTmp;
        args[0] = headerTmp;
        return joinPoint.proceed(args);
    }
    @Around("execution(* com.hzhr.iot.collect.service.CommandService.openValve(..))")
    public Object openValve(ProceedingJoinPoint joinPoint) throws Throwable {
        Object[] args = joinPoint.getArgs();
        Map<String, String> header = (Map<String, String>) args[0];
        if (header == null) {
            header = new HashMap<>();
        }
        Object protocolId = args[1];
        Map<String, Object> query = (Map<String, Object>) args[2];
        if (query == null) {
            query = new HashMap<>();
        }

        if (StringUtils.isEmpty(protocolId)) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "path.protocolId不能为空");
        }
        OpenValveModel body = (OpenValveModel)args[3];
        if (body == null) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body不能为空");
        }
        if (StringUtils.isEmpty(body.getDeviceId())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.deviceId不能为空");
        }

        Map<String, String> headerTmp = new HashMap<>();
        if (!StringUtils.isEmpty(header.get("_hzhr-company-id"))) {
            headerTmp.put("_hzhr-company-id", header.get("_hzhr-company-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-dept-id"))) {
            headerTmp.put("_hzhr-dept-id", header.get("_hzhr-dept-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-type"))) {
            headerTmp.put("_hzhr-user-type", header.get("_hzhr-user-type"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-access-mode"))) {
            headerTmp.put("_hzhr-access-mode", header.get("_hzhr-access-mode"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-name"))) {
            headerTmp.put("_hzhr-user-name", header.get("_hzhr-user-name"));
        }
        if (!StringUtils.isEmpty(header.get("_token"))) {
            headerTmp.put("_token", header.get("_token"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-code"))) {
            headerTmp.put("_hzhr-user-code", header.get("_hzhr-user-code"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-id"))) {
            headerTmp.put("_hzhr-transaction-id", header.get("_hzhr-transaction-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-id"))) {
            headerTmp.put("_hzhr-user-id", header.get("_hzhr-user-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-type"))) {
            headerTmp.put("_hzhr-transaction-type", header.get("_hzhr-transaction-type"));
        }
        if (!StringUtils.isEmpty(header.get("token"))) {
            headerTmp.put("_token", header.get("token"));
        }

        Map<String, Object> queryTmp = new HashMap<>();
        if (isInternalServiceInvok(headerTmp)) {
        } else {
        }

        if (isInternalServiceInvok(headerTmp)) {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._token不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-code"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-code不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-name"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-name不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-company-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-company-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-dept-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-dept-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-access-mode"))) {
                headerTmp.put("_hzhr-access-mode", "0");
            }
        } else {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header.token不能为空", objectInfo);
            }
        }

        if (!StringUtils.isEmpty(queryTmp.get("_is_paging")) && !Boolean.parseBoolean(queryTmp.get("_is_paging").toString())) {
            queryTmp.put("_page", null);
            queryTmp.put("_count", null);
        }
        args[2] = queryTmp;
        args[0] = headerTmp;
        return joinPoint.proceed(args);
    }
    @Around("execution(* com.hzhr.iot.collect.service.CommandService.ccr_addMeter(..))")
    public Object ccr_addMeter(ProceedingJoinPoint joinPoint) throws Throwable {
        Object[] args = joinPoint.getArgs();
        Map<String, String> header = (Map<String, String>) args[0];
        if (header == null) {
            header = new HashMap<>();
        }
        Object protocolId = args[1];
        Map<String, Object> query = (Map<String, Object>) args[2];
        if (query == null) {
            query = new HashMap<>();
        }

        if (StringUtils.isEmpty(protocolId)) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "path.protocolId不能为空");
        }
        AddMeterModel body = (AddMeterModel)args[3];
        if (body == null) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body不能为空");
        }
        if (StringUtils.isEmpty(body.getDeviceId())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.deviceId不能为空");
        }
        if (StringUtils.isEmpty(body.getMeterNo())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.meterNo不能为空");
        }

        Map<String, String> headerTmp = new HashMap<>();
        if (!StringUtils.isEmpty(header.get("_hzhr-company-id"))) {
            headerTmp.put("_hzhr-company-id", header.get("_hzhr-company-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-dept-id"))) {
            headerTmp.put("_hzhr-dept-id", header.get("_hzhr-dept-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-type"))) {
            headerTmp.put("_hzhr-user-type", header.get("_hzhr-user-type"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-access-mode"))) {
            headerTmp.put("_hzhr-access-mode", header.get("_hzhr-access-mode"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-name"))) {
            headerTmp.put("_hzhr-user-name", header.get("_hzhr-user-name"));
        }
        if (!StringUtils.isEmpty(header.get("_token"))) {
            headerTmp.put("_token", header.get("_token"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-code"))) {
            headerTmp.put("_hzhr-user-code", header.get("_hzhr-user-code"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-id"))) {
            headerTmp.put("_hzhr-transaction-id", header.get("_hzhr-transaction-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-id"))) {
            headerTmp.put("_hzhr-user-id", header.get("_hzhr-user-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-type"))) {
            headerTmp.put("_hzhr-transaction-type", header.get("_hzhr-transaction-type"));
        }
        if (!StringUtils.isEmpty(header.get("token"))) {
            headerTmp.put("_token", header.get("token"));
        }

        Map<String, Object> queryTmp = new HashMap<>();
        if (isInternalServiceInvok(headerTmp)) {
        } else {
        }

        if (isInternalServiceInvok(headerTmp)) {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._token不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-code"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-code不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-name"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-name不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-company-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-company-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-dept-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-dept-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-access-mode"))) {
                headerTmp.put("_hzhr-access-mode", "0");
            }
        } else {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header.token不能为空", objectInfo);
            }
        }

        if (!StringUtils.isEmpty(queryTmp.get("_is_paging")) && !Boolean.parseBoolean(queryTmp.get("_is_paging").toString())) {
            queryTmp.put("_page", null);
            queryTmp.put("_count", null);
        }
        args[2] = queryTmp;
        args[0] = headerTmp;
        return joinPoint.proceed(args);
    }
    @Around("execution(* com.hzhr.iot.collect.service.CommandService.searchIp(..))")
    public Object searchIp(ProceedingJoinPoint joinPoint) throws Throwable {
        Object[] args = joinPoint.getArgs();
        Map<String, String> header = (Map<String, String>) args[0];
        if (header == null) {
            header = new HashMap<>();
        }
        Object protocolId = args[1];
        Map<String, Object> query = (Map<String, Object>) args[2];
        if (query == null) {
            query = new HashMap<>();
        }

        if (StringUtils.isEmpty(protocolId)) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "path.protocolId不能为空");
        }
        SearchIpModel body = (SearchIpModel)args[3];
        if (body == null) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body不能为空");
        }
        if (StringUtils.isEmpty(body.getDeviceId())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.deviceId不能为空");
        }

        Map<String, String> headerTmp = new HashMap<>();
        if (!StringUtils.isEmpty(header.get("_hzhr-company-id"))) {
            headerTmp.put("_hzhr-company-id", header.get("_hzhr-company-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-dept-id"))) {
            headerTmp.put("_hzhr-dept-id", header.get("_hzhr-dept-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-type"))) {
            headerTmp.put("_hzhr-user-type", header.get("_hzhr-user-type"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-access-mode"))) {
            headerTmp.put("_hzhr-access-mode", header.get("_hzhr-access-mode"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-name"))) {
            headerTmp.put("_hzhr-user-name", header.get("_hzhr-user-name"));
        }
        if (!StringUtils.isEmpty(header.get("_token"))) {
            headerTmp.put("_token", header.get("_token"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-code"))) {
            headerTmp.put("_hzhr-user-code", header.get("_hzhr-user-code"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-id"))) {
            headerTmp.put("_hzhr-transaction-id", header.get("_hzhr-transaction-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-id"))) {
            headerTmp.put("_hzhr-user-id", header.get("_hzhr-user-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-type"))) {
            headerTmp.put("_hzhr-transaction-type", header.get("_hzhr-transaction-type"));
        }
        if (!StringUtils.isEmpty(header.get("token"))) {
            headerTmp.put("_token", header.get("token"));
        }

        Map<String, Object> queryTmp = new HashMap<>();
        if (isInternalServiceInvok(headerTmp)) {
        } else {
        }

        if (isInternalServiceInvok(headerTmp)) {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._token不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-code"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-code不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-name"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-name不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-company-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-company-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-dept-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-dept-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-access-mode"))) {
                headerTmp.put("_hzhr-access-mode", "0");
            }
        } else {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header.token不能为空", objectInfo);
            }
        }

        if (!StringUtils.isEmpty(queryTmp.get("_is_paging")) && !Boolean.parseBoolean(queryTmp.get("_is_paging").toString())) {
            queryTmp.put("_page", null);
            queryTmp.put("_count", null);
        }
        args[2] = queryTmp;
        args[0] = headerTmp;
        return joinPoint.proceed(args);
    }
    @Around("execution(* com.hzhr.iot.collect.service.CommandService.searchReportTime(..))")
    public Object searchReportTime(ProceedingJoinPoint joinPoint) throws Throwable {
        Object[] args = joinPoint.getArgs();
        Map<String, String> header = (Map<String, String>) args[0];
        if (header == null) {
            header = new HashMap<>();
        }
        Object protocolId = args[1];
        Map<String, Object> query = (Map<String, Object>) args[2];
        if (query == null) {
            query = new HashMap<>();
        }

        if (StringUtils.isEmpty(protocolId)) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "path.protocolId不能为空");
        }
        SearchReportTimeModel body = (SearchReportTimeModel)args[3];
        if (body == null) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body不能为空");
        }
        if (StringUtils.isEmpty(body.getDeviceId())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.deviceId不能为空");
        }

        Map<String, String> headerTmp = new HashMap<>();
        if (!StringUtils.isEmpty(header.get("_hzhr-company-id"))) {
            headerTmp.put("_hzhr-company-id", header.get("_hzhr-company-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-dept-id"))) {
            headerTmp.put("_hzhr-dept-id", header.get("_hzhr-dept-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-type"))) {
            headerTmp.put("_hzhr-user-type", header.get("_hzhr-user-type"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-access-mode"))) {
            headerTmp.put("_hzhr-access-mode", header.get("_hzhr-access-mode"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-name"))) {
            headerTmp.put("_hzhr-user-name", header.get("_hzhr-user-name"));
        }
        if (!StringUtils.isEmpty(header.get("_token"))) {
            headerTmp.put("_token", header.get("_token"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-code"))) {
            headerTmp.put("_hzhr-user-code", header.get("_hzhr-user-code"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-id"))) {
            headerTmp.put("_hzhr-transaction-id", header.get("_hzhr-transaction-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-id"))) {
            headerTmp.put("_hzhr-user-id", header.get("_hzhr-user-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-type"))) {
            headerTmp.put("_hzhr-transaction-type", header.get("_hzhr-transaction-type"));
        }
        if (!StringUtils.isEmpty(header.get("token"))) {
            headerTmp.put("_token", header.get("token"));
        }

        Map<String, Object> queryTmp = new HashMap<>();
        if (isInternalServiceInvok(headerTmp)) {
        } else {
        }

        if (isInternalServiceInvok(headerTmp)) {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._token不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-code"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-code不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-name"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-name不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-company-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-company-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-dept-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-dept-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-access-mode"))) {
                headerTmp.put("_hzhr-access-mode", "0");
            }
        } else {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header.token不能为空", objectInfo);
            }
        }

        if (!StringUtils.isEmpty(queryTmp.get("_is_paging")) && !Boolean.parseBoolean(queryTmp.get("_is_paging").toString())) {
            queryTmp.put("_page", null);
            queryTmp.put("_count", null);
        }
        args[2] = queryTmp;
        args[0] = headerTmp;
        return joinPoint.proceed(args);
    }
    @Around("execution(* com.hzhr.iot.collect.service.CommandService.setAlarmValue(..))")
    public Object setAlarmValue(ProceedingJoinPoint joinPoint) throws Throwable {
        Object[] args = joinPoint.getArgs();
        Map<String, String> header = (Map<String, String>) args[0];
        if (header == null) {
            header = new HashMap<>();
        }
        Object protocolId = args[1];
        Map<String, Object> query = (Map<String, Object>) args[2];
        if (query == null) {
            query = new HashMap<>();
        }

        if (StringUtils.isEmpty(protocolId)) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "path.protocolId不能为空");
        }
        SetAlarmValueModel body = (SetAlarmValueModel)args[3];
        if (body == null) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body不能为空");
        }
        if (StringUtils.isEmpty(body.getDeviceId())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.deviceId不能为空");
        }
        if (StringUtils.isEmpty(body.getAlarmMax())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.alarmMax不能为空");
        }
        if (StringUtils.isEmpty(body.getAlarmMin())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.alarmMin不能为空");
        }

        Map<String, String> headerTmp = new HashMap<>();
        if (!StringUtils.isEmpty(header.get("_hzhr-company-id"))) {
            headerTmp.put("_hzhr-company-id", header.get("_hzhr-company-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-dept-id"))) {
            headerTmp.put("_hzhr-dept-id", header.get("_hzhr-dept-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-type"))) {
            headerTmp.put("_hzhr-user-type", header.get("_hzhr-user-type"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-access-mode"))) {
            headerTmp.put("_hzhr-access-mode", header.get("_hzhr-access-mode"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-name"))) {
            headerTmp.put("_hzhr-user-name", header.get("_hzhr-user-name"));
        }
        if (!StringUtils.isEmpty(header.get("_token"))) {
            headerTmp.put("_token", header.get("_token"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-code"))) {
            headerTmp.put("_hzhr-user-code", header.get("_hzhr-user-code"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-id"))) {
            headerTmp.put("_hzhr-transaction-id", header.get("_hzhr-transaction-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-id"))) {
            headerTmp.put("_hzhr-user-id", header.get("_hzhr-user-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-type"))) {
            headerTmp.put("_hzhr-transaction-type", header.get("_hzhr-transaction-type"));
        }
        if (!StringUtils.isEmpty(header.get("token"))) {
            headerTmp.put("_token", header.get("token"));
        }

        Map<String, Object> queryTmp = new HashMap<>();
        if (isInternalServiceInvok(headerTmp)) {
        } else {
        }

        if (isInternalServiceInvok(headerTmp)) {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._token不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-code"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-code不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-name"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-name不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-company-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-company-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-dept-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-dept-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-access-mode"))) {
                headerTmp.put("_hzhr-access-mode", "0");
            }
        } else {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header.token不能为空", objectInfo);
            }
        }

        if (!StringUtils.isEmpty(queryTmp.get("_is_paging")) && !Boolean.parseBoolean(queryTmp.get("_is_paging").toString())) {
            queryTmp.put("_page", null);
            queryTmp.put("_count", null);
        }
        args[2] = queryTmp;
        args[0] = headerTmp;
        return joinPoint.proceed(args);
    }
    @Around("execution(* com.hzhr.iot.collect.service.CommandService.ccr_searchMeter(..))")
    public Object ccr_searchMeter(ProceedingJoinPoint joinPoint) throws Throwable {
        Object[] args = joinPoint.getArgs();
        Map<String, String> header = (Map<String, String>) args[0];
        if (header == null) {
            header = new HashMap<>();
        }
        Object protocolId = args[1];
        Map<String, Object> query = (Map<String, Object>) args[2];
        if (query == null) {
            query = new HashMap<>();
        }

        if (StringUtils.isEmpty(protocolId)) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "path.protocolId不能为空");
        }
        SearchMeterModel body = (SearchMeterModel)args[3];
        if (body == null) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body不能为空");
        }
        if (StringUtils.isEmpty(body.getDeviceId())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.deviceId不能为空");
        }

        Map<String, String> headerTmp = new HashMap<>();
        if (!StringUtils.isEmpty(header.get("_hzhr-company-id"))) {
            headerTmp.put("_hzhr-company-id", header.get("_hzhr-company-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-dept-id"))) {
            headerTmp.put("_hzhr-dept-id", header.get("_hzhr-dept-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-type"))) {
            headerTmp.put("_hzhr-user-type", header.get("_hzhr-user-type"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-access-mode"))) {
            headerTmp.put("_hzhr-access-mode", header.get("_hzhr-access-mode"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-name"))) {
            headerTmp.put("_hzhr-user-name", header.get("_hzhr-user-name"));
        }
        if (!StringUtils.isEmpty(header.get("_token"))) {
            headerTmp.put("_token", header.get("_token"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-code"))) {
            headerTmp.put("_hzhr-user-code", header.get("_hzhr-user-code"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-id"))) {
            headerTmp.put("_hzhr-transaction-id", header.get("_hzhr-transaction-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-id"))) {
            headerTmp.put("_hzhr-user-id", header.get("_hzhr-user-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-type"))) {
            headerTmp.put("_hzhr-transaction-type", header.get("_hzhr-transaction-type"));
        }
        if (!StringUtils.isEmpty(header.get("token"))) {
            headerTmp.put("_token", header.get("token"));
        }

        Map<String, Object> queryTmp = new HashMap<>();
        if (isInternalServiceInvok(headerTmp)) {
        } else {
        }

        if (isInternalServiceInvok(headerTmp)) {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._token不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-code"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-code不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-name"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-name不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-company-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-company-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-dept-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-dept-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-access-mode"))) {
                headerTmp.put("_hzhr-access-mode", "0");
            }
        } else {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header.token不能为空", objectInfo);
            }
        }

        if (!StringUtils.isEmpty(queryTmp.get("_is_paging")) && !Boolean.parseBoolean(queryTmp.get("_is_paging").toString())) {
            queryTmp.put("_page", null);
            queryTmp.put("_count", null);
        }
        args[2] = queryTmp;
        args[0] = headerTmp;
        return joinPoint.proceed(args);
    }
    @Around("execution(* com.hzhr.iot.collect.service.CommandService.searchDayHis(..))")
    public Object searchDayHis(ProceedingJoinPoint joinPoint) throws Throwable {
        Object[] args = joinPoint.getArgs();
        Map<String, String> header = (Map<String, String>) args[0];
        if (header == null) {
            header = new HashMap<>();
        }
        Object protocolId = args[1];
        Map<String, Object> query = (Map<String, Object>) args[2];
        if (query == null) {
            query = new HashMap<>();
        }

        if (StringUtils.isEmpty(protocolId)) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "path.protocolId不能为空");
        }
        SearchDayHisModel body = (SearchDayHisModel)args[3];
        if (body == null) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body不能为空");
        }
        if (StringUtils.isEmpty(body.getDeviceId())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.deviceId不能为空");
        }

        Map<String, String> headerTmp = new HashMap<>();
        if (!StringUtils.isEmpty(header.get("_hzhr-company-id"))) {
            headerTmp.put("_hzhr-company-id", header.get("_hzhr-company-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-dept-id"))) {
            headerTmp.put("_hzhr-dept-id", header.get("_hzhr-dept-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-type"))) {
            headerTmp.put("_hzhr-user-type", header.get("_hzhr-user-type"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-access-mode"))) {
            headerTmp.put("_hzhr-access-mode", header.get("_hzhr-access-mode"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-name"))) {
            headerTmp.put("_hzhr-user-name", header.get("_hzhr-user-name"));
        }
        if (!StringUtils.isEmpty(header.get("_token"))) {
            headerTmp.put("_token", header.get("_token"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-code"))) {
            headerTmp.put("_hzhr-user-code", header.get("_hzhr-user-code"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-id"))) {
            headerTmp.put("_hzhr-transaction-id", header.get("_hzhr-transaction-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-id"))) {
            headerTmp.put("_hzhr-user-id", header.get("_hzhr-user-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-type"))) {
            headerTmp.put("_hzhr-transaction-type", header.get("_hzhr-transaction-type"));
        }
        if (!StringUtils.isEmpty(header.get("token"))) {
            headerTmp.put("_token", header.get("token"));
        }

        Map<String, Object> queryTmp = new HashMap<>();
        if (isInternalServiceInvok(headerTmp)) {
        } else {
        }

        if (isInternalServiceInvok(headerTmp)) {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._token不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-code"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-code不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-name"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-name不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-company-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-company-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-dept-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-dept-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-access-mode"))) {
                headerTmp.put("_hzhr-access-mode", "0");
            }
        } else {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header.token不能为空", objectInfo);
            }
        }

        if (!StringUtils.isEmpty(queryTmp.get("_is_paging")) && !Boolean.parseBoolean(queryTmp.get("_is_paging").toString())) {
            queryTmp.put("_page", null);
            queryTmp.put("_count", null);
        }
        args[2] = queryTmp;
        args[0] = headerTmp;
        return joinPoint.proceed(args);
    }
    @Around("execution(* com.hzhr.iot.collect.service.CommandService.nb_setNewMeterNo(..))")
    public Object nb_setNewMeterNo(ProceedingJoinPoint joinPoint) throws Throwable {
        Object[] args = joinPoint.getArgs();
        Map<String, String> header = (Map<String, String>) args[0];
        if (header == null) {
            header = new HashMap<>();
        }
        Object protocolId = args[1];
        Map<String, Object> query = (Map<String, Object>) args[2];
        if (query == null) {
            query = new HashMap<>();
        }

        if (StringUtils.isEmpty(protocolId)) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "path.protocolId不能为空");
        }
        SetNewMeterNoModel body = (SetNewMeterNoModel)args[3];
        if (body == null) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body不能为空");
        }
        if (StringUtils.isEmpty(body.getDeviceId())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.deviceId不能为空");
        }
        if (StringUtils.isEmpty(body.getNewMeterNo())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.newMeterNo不能为空");
        }

        Map<String, String> headerTmp = new HashMap<>();
        if (!StringUtils.isEmpty(header.get("_hzhr-company-id"))) {
            headerTmp.put("_hzhr-company-id", header.get("_hzhr-company-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-dept-id"))) {
            headerTmp.put("_hzhr-dept-id", header.get("_hzhr-dept-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-type"))) {
            headerTmp.put("_hzhr-user-type", header.get("_hzhr-user-type"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-access-mode"))) {
            headerTmp.put("_hzhr-access-mode", header.get("_hzhr-access-mode"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-name"))) {
            headerTmp.put("_hzhr-user-name", header.get("_hzhr-user-name"));
        }
        if (!StringUtils.isEmpty(header.get("_token"))) {
            headerTmp.put("_token", header.get("_token"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-code"))) {
            headerTmp.put("_hzhr-user-code", header.get("_hzhr-user-code"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-id"))) {
            headerTmp.put("_hzhr-transaction-id", header.get("_hzhr-transaction-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-id"))) {
            headerTmp.put("_hzhr-user-id", header.get("_hzhr-user-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-type"))) {
            headerTmp.put("_hzhr-transaction-type", header.get("_hzhr-transaction-type"));
        }
        if (!StringUtils.isEmpty(header.get("token"))) {
            headerTmp.put("_token", header.get("token"));
        }

        Map<String, Object> queryTmp = new HashMap<>();
        if (isInternalServiceInvok(headerTmp)) {
        } else {
        }

        if (isInternalServiceInvok(headerTmp)) {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._token不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-code"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-code不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-name"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-name不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-company-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-company-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-dept-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-dept-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-access-mode"))) {
                headerTmp.put("_hzhr-access-mode", "0");
            }
        } else {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header.token不能为空", objectInfo);
            }
        }

        if (!StringUtils.isEmpty(queryTmp.get("_is_paging")) && !Boolean.parseBoolean(queryTmp.get("_is_paging").toString())) {
            queryTmp.put("_page", null);
            queryTmp.put("_count", null);
        }
        args[2] = queryTmp;
        args[0] = headerTmp;
        return joinPoint.proceed(args);
    }
    @Around("execution(* com.hzhr.iot.collect.service.CommandService.closeValve(..))")
    public Object closeValve(ProceedingJoinPoint joinPoint) throws Throwable {
        Object[] args = joinPoint.getArgs();
        Map<String, String> header = (Map<String, String>) args[0];
        if (header == null) {
            header = new HashMap<>();
        }
        Object protocolId = args[1];
        Map<String, Object> query = (Map<String, Object>) args[2];
        if (query == null) {
            query = new HashMap<>();
        }

        if (StringUtils.isEmpty(protocolId)) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "path.protocolId不能为空");
        }
        CloseValveModel body = (CloseValveModel)args[3];
        if (body == null) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body不能为空");
        }
        if (StringUtils.isEmpty(body.getDeviceId())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.deviceId不能为空");
        }

        Map<String, String> headerTmp = new HashMap<>();
        if (!StringUtils.isEmpty(header.get("_hzhr-company-id"))) {
            headerTmp.put("_hzhr-company-id", header.get("_hzhr-company-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-dept-id"))) {
            headerTmp.put("_hzhr-dept-id", header.get("_hzhr-dept-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-type"))) {
            headerTmp.put("_hzhr-user-type", header.get("_hzhr-user-type"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-access-mode"))) {
            headerTmp.put("_hzhr-access-mode", header.get("_hzhr-access-mode"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-name"))) {
            headerTmp.put("_hzhr-user-name", header.get("_hzhr-user-name"));
        }
        if (!StringUtils.isEmpty(header.get("_token"))) {
            headerTmp.put("_token", header.get("_token"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-code"))) {
            headerTmp.put("_hzhr-user-code", header.get("_hzhr-user-code"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-id"))) {
            headerTmp.put("_hzhr-transaction-id", header.get("_hzhr-transaction-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-id"))) {
            headerTmp.put("_hzhr-user-id", header.get("_hzhr-user-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-type"))) {
            headerTmp.put("_hzhr-transaction-type", header.get("_hzhr-transaction-type"));
        }
        if (!StringUtils.isEmpty(header.get("token"))) {
            headerTmp.put("_token", header.get("token"));
        }

        Map<String, Object> queryTmp = new HashMap<>();
        if (isInternalServiceInvok(headerTmp)) {
        } else {
        }

        if (isInternalServiceInvok(headerTmp)) {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._token不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-code"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-code不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-name"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-name不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-company-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-company-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-dept-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-dept-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-access-mode"))) {
                headerTmp.put("_hzhr-access-mode", "0");
            }
        } else {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header.token不能为空", objectInfo);
            }
        }

        if (!StringUtils.isEmpty(queryTmp.get("_is_paging")) && !Boolean.parseBoolean(queryTmp.get("_is_paging").toString())) {
            queryTmp.put("_page", null);
            queryTmp.put("_count", null);
        }
        args[2] = queryTmp;
        args[0] = headerTmp;
        return joinPoint.proceed(args);
    }
    @Around("execution(* com.hzhr.iot.collect.service.CommandService.ccr_openValve(..))")
    public Object ccr_openValve(ProceedingJoinPoint joinPoint) throws Throwable {
        Object[] args = joinPoint.getArgs();
        Map<String, String> header = (Map<String, String>) args[0];
        if (header == null) {
            header = new HashMap<>();
        }
        Object protocolId = args[1];
        Map<String, Object> query = (Map<String, Object>) args[2];
        if (query == null) {
            query = new HashMap<>();
        }

        if (StringUtils.isEmpty(protocolId)) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "path.protocolId不能为空");
        }
        OpenValve1Model body = (OpenValve1Model)args[3];
        if (body == null) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body不能为空");
        }
        if (StringUtils.isEmpty(body.getDeviceId())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.deviceId不能为空");
        }
        if (StringUtils.isEmpty(body.getMeterNo())) {
            throw new ServiceException(Common_ErrorsEnum.COMMON_6, "body.meterNo不能为空");
        }

        Map<String, String> headerTmp = new HashMap<>();
        if (!StringUtils.isEmpty(header.get("_hzhr-company-id"))) {
            headerTmp.put("_hzhr-company-id", header.get("_hzhr-company-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-dept-id"))) {
            headerTmp.put("_hzhr-dept-id", header.get("_hzhr-dept-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-type"))) {
            headerTmp.put("_hzhr-user-type", header.get("_hzhr-user-type"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-access-mode"))) {
            headerTmp.put("_hzhr-access-mode", header.get("_hzhr-access-mode"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-name"))) {
            headerTmp.put("_hzhr-user-name", header.get("_hzhr-user-name"));
        }
        if (!StringUtils.isEmpty(header.get("_token"))) {
            headerTmp.put("_token", header.get("_token"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-code"))) {
            headerTmp.put("_hzhr-user-code", header.get("_hzhr-user-code"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-id"))) {
            headerTmp.put("_hzhr-transaction-id", header.get("_hzhr-transaction-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-user-id"))) {
            headerTmp.put("_hzhr-user-id", header.get("_hzhr-user-id"));
        }
        if (!StringUtils.isEmpty(header.get("_hzhr-transaction-type"))) {
            headerTmp.put("_hzhr-transaction-type", header.get("_hzhr-transaction-type"));
        }
        if (!StringUtils.isEmpty(header.get("token"))) {
            headerTmp.put("_token", header.get("token"));
        }

        Map<String, Object> queryTmp = new HashMap<>();
        if (isInternalServiceInvok(headerTmp)) {
        } else {
        }

        if (isInternalServiceInvok(headerTmp)) {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._token不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-code"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-code不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-name"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-name不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-company-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-company-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-dept-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-dept-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-user-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-user-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-id"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-id不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-transaction-type"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header._hzhr-transaction-type不能为空", objectInfo);
            }
            if (StringUtils.isEmpty(headerTmp.get("_hzhr-access-mode"))) {
                headerTmp.put("_hzhr-access-mode", "0");
            }
        } else {
            if (StringUtils.isEmpty(headerTmp.get("_token"))) {
                Map<String, Object> objectInfo = new HashMap<>();
                objectInfo.put("header", headerTmp);
                throw new ServiceException(Common_ErrorsEnum.COMMON_6, "header.token不能为空", objectInfo);
            }
        }

        if (!StringUtils.isEmpty(queryTmp.get("_is_paging")) && !Boolean.parseBoolean(queryTmp.get("_is_paging").toString())) {
            queryTmp.put("_page", null);
            queryTmp.put("_count", null);
        }
        args[2] = queryTmp;
        args[0] = headerTmp;
        return joinPoint.proceed(args);
    }
}

